本文共 955 字,大约阅读时间需要 3 分钟。
很简单,打开python解释器,使用dir()方法即可;
示例:
>>> dir(platform)['DEV_NULL', '__builtins__', '__copyright__', '__doc__', '__file__', '__name__', '__package__', '__version__', '_abspath', '_dist_try_harder', '_follow_symlinks', '_ironpython_sys_version_parser', '_java_getprop', '_libc_search', '_platform', '_platform_cache', '_popen', '_pypy_sys_version_parser', '_release_filename', '_release_version', '_supported_dists', '_sys_version', '_sys_version_cache', '_sys_version_parser', '_syscmd_file', '_syscmd_uname', '_syscmd_ver', '_uname_cache', '_ver_output', '_win32_getvalue', 'architecture', 'dist', 'java_ver', 'libc_ver', 'linux_distribution', 'mac_ver', 'machine', 'node', 'os', 'platform', 'popen', 'processor', 'python_branch', 'python_build', 'python_compiler', 'python_implementation', 'python_revision', 'python_version', 'python_version_tuple', 're', 'release', 'string', 'sys', 'system', 'system_alias', 'uname', 'version', 'win32_ver']
转载地址:http://wzorb.baihongyu.com/