Brief introduction
SYS module is used to provide actions related to the Python interpreter
sys.argv command line parameter list, the first element is the program itself path Sys.modules returns the System Import module field, key is the module name, value is the module sys.exit (n) exit program, exit normally exits (0) Sys.versi On gets the version information of the Python interpreter sys.maxint the largest int value Sys.path returns the search path for the module, using the value of the PYTHONPATH environment variable when initializing Sys.platform Returns the operating system platform name Sys.stdout.write ('Please :') Val= Sys.stdin.readline () [:-1]sys.modules.keys () returns all imported module names Sys.modules.values () returns all imported modules Sys.exc_info () Gets the exception class currently being processed, Exc_type, exc_ Value, Exc_traceback the exception details currently handled Sys.exit (n) exit the program, exit normally (0) Sys.hexversion get the version value of the Python interpreter, 16 binary format as:0x020403f0Sys.version gets the Python interpreter's Sys.api_version interpreter for the API version of C Sys.version_info ' final ' means final, also ' candidate ' for the candidate, serial for version level, whether there is a successor to the release Sys.displayhook (value) if value is not NULL, the function will output it to sys.stdout and save him in __builtin__._. In Python's interactive interpreter, ' _ ' On behalf of the last time you entered the results, Hook is the meaning of the hook, the last results hooked sys.getdefaultencoding () return the current default character encoding format you use Sys.getfilesystemencoding () Returns the encoding of the Unicode file name to the system file name Sys.setdefaultencoding (name) is used to set the current default character encoding, if name and any one of the available encodings do not match, throw Lookuperror, This function will only be used by the site module Sitecustomize, once the site module is used, he will remove the Sys.builtin_module_names Python interpreter imported module list from the SYS module sys.executable Python interpreter path Sys.getwindowsversion () Gets the version of Windows Sys.copyright Records Python copyright related things sys.byteorder local byte rule indicator, big The value of the-endian platform is ' big ', little-the value of the endian platform is ' little ' sys.exc_clear () is used to clear the current or most recent error message that occurs on the current thread Sys.exec_prefix returns the location of the platform standalone Python file installation Sys.stderr Error output Sys.stdin standard input sys.stdout standard output Sys.platform returns the operating system platform name Sys.path returns the search path for the module, using PYTHONP when initializing The value of the ATH environment variable sys.maxunicode the largest Unicode value sys.maxint the largest int value sys.version gets the version information of the Python interpreter sys.hexversion gets Python interpreter version value, 16 binary format such as:0x020403f0
Python---Sys