Tools, FAQ, Tutorials:
What Is Python Module 'sys'
What Is Python module "sys"?
✍: FYIcenter.com
"sys" is a Python internal module that provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter.
Here are some important properties and functions provided by the "sys" module:
>>> import sys >>> sys.argv # represents command line arguments as a list >>> sys.builtin_module_names # represents built-in module names as a tuple >>> sys.executable # represents the executable file of the Python engine >>> sys.exit() # terminates execution >>> sys.flags # represents command line flags as sys.flags object >>> sys.float_info # represents float type info as sys.float_info object >>> sys.getdefaultencoding() # returns the default encoding >>> sys.sys.getsizeof() # returns the size of a given object >>> sys.getwindowsversion() # returns Windows info as a tuple >>> sys.hash_info # represents hash algorithm info as a hash_info object >>> sys.implementation # represents Python implementation info >>> sys.intern() # converts a string into an interned string >>> sys.modules # represents list of loaded modules >>> sys.path # represents file path list for importing modules >>> sys.stdin # represents the standard input as an File object >>> sys.stdout # represents the standard output as an File object >>> sys.stderr # represents the standard error output as an File object >>> sys.version # represents the version string of Python engine
For more information, see sys — System-specific parameters and functions.
⇒ Printing Python Engine Information
⇐ 'sys' Module - System Parameters and Functions
2018-11-11, 1958🔥, 0💬
Popular Posts:
What is EPUB 2.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 2.0 Metadata "dc:publisher" ...
Where Can I get a copy of the RSS XML Schema? RSS XML Schema is an XML Schema that defines how an RS...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to Instantiate Chaincode on BYFN Channel? You can follow this tutorial to Instantiate Chaincode ...
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...