The SYS module operates as follows:
1sys.argv#implements passing parameters from outside the program to the program. 2Sys.exit ([ARG])#exit in the middle of the program, arg=0 for normal exit. 3Sys.getdefaultencoding ()#gets the system current encoding, which is generally ASCII by default. 4Sys.setdefaultencoding ()#set the system default encoding, do not see this method when executing dir (SYS), do not pass in the interpreter, can execute reload (SYS), perform setdefaultencoding (' UTF8 ') at this time, the system default encoding is set to UTF8. (See Set system default encoding)5Sys.getfilesystemencoding ()#get the file system using the encoding method, return ' MBCS ' under Windows, and return ' Utf-8 ' under Mac.6Sys.path#gets a collection of strings for the specified module's search path, which can be placed in a given path, and can be found correctly when import is in the program. 7Sys.stdin,sys.stdout,sys.stderr#stdin, stdout, and stderr variables contain stream objects that correspond to standard I/O streams. If you need more control over the output, and print doesn't meet your requirements, they're what you need. You can also replace them, and you can redirect output and input to other devices ( Device), or they are handled in a non-standard way8Sys.maxsize#gets the system maximum size9Sys.platform#gets the current system platform. TenSys.version#Get Python version OneSys.builtin_module_names#returns a list containing the names of the built-in modules ASys.modules#returns a dictionary containing the module name
"Python module learning" SYS module