sys – system specific functions¶
Functions¶
- 
sys.exit([retval])¶
- Raise a - SystemExitexception. If an argument is given, it is the value given to- SystemExit.
- 
sys.print_exception(exc[, file])¶
- Print exception with a traceback to a file-like object - file(or- sys.stdoutby default).- Difference to CPython - This function appears in the - tracebackmodule in CPython.
Constants¶
- 
sys.argv¶
- a mutable list of arguments this program started with 
- 
sys.byteorder¶
- the byte order of the system (“little” or “big”) 
- 
sys.path¶
- a mutable list of directories to search for imported modules 
- 
sys.platform¶
- The platform that MicroPython is running on. This is “pyboard” on the pyboard and provides a robust way of determining if a script is running on the pyboard or not. 
- 
sys.stderr¶
- standard error (connected to USB VCP, and optional UART object) 
- 
sys.stdin¶
- standard input (connected to USB VCP, and optional UART object) 
- 
sys.stdout¶
- standard output (connected to USB VCP, and optional UART object) 
- 
sys.version¶
- Python language version that this implementation conforms to, as a string 
- 
sys.version_info¶
- Python language version that this implementation conforms to, as a tuple of ints