[zurück] | 2.7. Modul sys |
[vor] |
Mit dem Befehl dir lassen sich alle Funktionen des Moduls sys anzeigen.
print(dir(sys)) | ['__displayhook__', '__doc__', '__excepthook__', '__name__', '__package__', '__stderr__', '__stdin__', '__stdout__', '_clear_type_cache', '_current_frames', '_getframe', 'api_version', 'argv', 'builtin_module_names', 'byteorder', 'call_tracing', 'callstats', 'copyright', 'displayhook', 'dllhandle', 'dont_write_bytecode', 'exc_clear', 'exc_info', 'exc_type', 'excepthook', 'exec_prefix', 'executable', 'exit', 'flags', 'float_info', 'getcheckinterval', 'getdefaultencoding', 'getfilesystemencoding', 'getprofile', 'getrecursionlimit', 'getrefcount', 'getsizeof', 'gettrace', 'getwindowsversion', 'hexversion', 'last_traceback', 'last_type', 'last_value', 'maxint', 'maxsize', 'maxunicode', 'meta_path', 'modules', 'path', 'path_hooks', 'path_importer_cache', 'platform', 'plugin_path', 'prefix', 'py3kwarning', 'save_exit', 'save_stderr', 'save_stdin', 'save_stdout', 'script_path', 'setcheckinterval', 'setprofile', 'setrecursionlimit', 'settrace', 'stderr', 'stdin', 'stdout', 'subversion', 'version', 'version_info', 'warnoptions', 'winver'] |
Python und Windows Version
print(sys.version) | 2.6.4 (r264:75706, Mar 6 2012, 02:29:40) [MSC v.1600 64 bit (AMD64)] |
print(sys.subversion) | ('CPython', 'tags/r264', '75706') |
print(sys.version_info) | (2, 6, 4, 'final', 0) |
print(sys.winver) | 2.6 |
print(sys.platform) | win32 |
Copyright
print(sys.copyright) | Copyright (c) 2001-2009 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved. |
Pfade
print(sys.path) | ['C:\\Program Files\\MAXON\\CINEMA 4D R16\\resource\\modules\\python\\python.win64.framework\\python26.zip', 'C:\\Program Files\\MAXON\\CINEMA 4D R16\\resource\\modules\\python\\Python.win64.framework\\DLLs', 'C:\\Program Files\\MAXON\\CINEMA 4D R16\\resource\\modules\\python\\Python.win64.framework\\lib', 'C:\\Program Files\\MAXON\\CINEMA 4D R16\\resource\\modules\\python\\Python.win64.framework\\lib\\plat-win', 'C:\\Program Files\\MAXON\\CINEMA 4D R16\\resource\\modules\\python\\Python.win64.framework\\l ib\\lib-tk', 'C:\\Program Files\\MAXON\\CINEMA 4D R16', 'C:\\Program Files\\MAXON\\CINEMA 4D R16\\resource\\modules\\python\\Python.win64.framework', 'C:\\Program Files\\MAXON\\CINEMA 4D R16\\resource\\modules\\python\\Python.win64.framework\\lib\\site-packages', 'C:\\Users\\Benutzer1\\AppData\\Roaming\\MAXON\\CINEMA 4D R16_14AF56B1\\library\\python\\packages\\win64'] |
print(sys.plugin_path) | ['C:\\Program Files\\MAXON\\CINEMA 4D R16\\plugins', 'C:\\Users\\Benutzer1\\AppData\\Roaming\\MAXON\\CINEMA 4D R16_14AF56B1\\plugins'] |
print(sys.script_path) | ['C:\\Program Files\\MAXON\\CINEMA 4D R16\\library\\scripts', 'C:\\Users\\Benutzer1\\AppData\\Roaming\\MAXON\\CINEMA 4D R16_14AF56B1\\library\\scripts'] |
[zurück] | [Inhaltsverzeichnis] | [vor] |