sys | index (built-in) Module Reference |
This module provides access to some objects used or maintained by the
interpreter and to functions that interact strongly with the interpreter.
Dynamic objects:
argv -- command line arguments; argv[0] is the script pathname if known
path -- module search path; path[0] is the script directory, else ''
modules -- dictionary of loaded modules
displayhook -- called to show results in an interactive session
excepthook -- called to handle any uncaught exception other than SystemExit
To customize printing in an interactive session or to install a custom
top-level exception handler, assign other functions to replace these.
stdin -- standard input file object; used by input()
stdout -- standard output file object; used by print()
stderr -- standard error object; used for error messages
By assigning other file objects (or objects that behave like files)
to these, it is possible to redirect all of the interpreter's I/O.
last_type -- type of last uncaught exception
last_value -- value of last uncaught exception
last_traceback -- traceback of last uncaught exception
These three are only available in an interactive session after a
traceback has been printed.
Static objects:
builtin_module_names -- tuple of module names built into this interpreter
copyright -- copyright notice pertaining to this interpreter
exec_prefix -- prefix used to find the machine-specific Python library
executable -- absolute path of the executable binary of the Python interpreter
float_info -- a struct sequence with information about the float implementation.
float_repr_style -- string indicating the style of repr() output for floats
hash_info -- a struct sequence with information about the hash algorithm.
hexversion -- version information encoded as a single integer
implementation -- Python implementation information.
int_info -- a struct sequence with information about the int implementation.
maxsize -- the largest supported length of containers.
maxunicode -- the value of the largest Unicode code point
platform -- platform identifier
prefix -- prefix used to find the Python library
thread_info -- a struct sequence with information about the thread implementation.
version -- the version of this interpreter as a string
version_info -- version information as a named tuple
__stdin__ -- the original stdin; don't touch!
__stdout__ -- the original stdout; don't touch!
__stderr__ -- the original stderr; don't touch!
__displayhook__ -- the original displayhook; don't touch!
__excepthook__ -- the original excepthook; don't touch!
Functions:
displayhook() -- print an object to the screen, and save it in builtins._
excepthook() -- print an exception and its traceback to sys.stderr
exc_info() -- return thread-safe information about the current exception
exit() -- exit the interpreter by raising SystemExit
getdlopenflags() -- returns flags to be used for dlopen() calls
getprofile() -- get the global profiling function
getrefcount() -- return the reference count for an object (plus one :-)
getrecursionlimit() -- return the max recursion depth for the interpreter
getsizeof() -- return the size of an object in bytes
gettrace() -- get the global debug tracing function
setcheckinterval() -- control how often the interpreter checks for events
setdlopenflags() -- set the flags to be used for dlopen() calls
setprofile() -- set the global profiling function
setrecursionlimit() -- set the max recursion depth for the interpreter
settrace() -- set the global debug tracing function
Functions | ||
|
Data | ||
__stderr__ = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'> __stdin__ = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='UTF-8'> __stdout__ = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'> abiflags = 'm' api_version = 1013 argv = ['/usr/lib/python3.6/pydoc.py', '-w', 'sys'] base_exec_prefix = '/home/linkliman/Documents/Python/Python3.6' base_prefix = '/home/linkliman/Documents/Python/Python3.6' builtin_module_names = ('_ast', '_bisect', '_blake2', '_codecs', '_collections', '_datetime', '_elementtree', '_functools', '_heapq', '_imp', '_io', '_locale', '_md5', '_operator', '_pickle', '_posixsubprocess', '_random', '_sha1', '_sha256', '_sha3', ...) byteorder = 'little' copyright = 'Copyright (c) 2001-2018 Python Software Foundati...ematisch Centrum, Amsterdam.\nAll Rights Reserved.' dont_write_bytecode = False exec_prefix = '/home/linkliman/Documents/Python/Python3.6' executable = '/home/linkliman/Documents/Python/Python3.6/bin/python' flags = sys.flags(debug=0, inspect=0, interactive=0, opt...ing=0, quiet=0, hash_randomization=1, isolated=0) float_info = sys.float_info(max=1.7976931348623157e+308, max_...epsilon=2.220446049250313e-16, radix=2, rounds=1) float_repr_style = 'short' hash_info = sys.hash_info(width=64, modulus=2305843009213693...iphash24', hash_bits=64, seed_bits=128, cutoff=0) hexversion = 50726640 implementation = namespace(_multiarch='x86_64-linux-gnu', cache_t...inor=6, micro=6, releaselevel='final', serial=0)) int_info = sys.int_info(bits_per_digit=30, sizeof_digit=4) maxsize = 9223372036854775807 maxunicode = 1114111 meta_path = [<class '_frozen_importlib.BuiltinImporter'>, <class '_frozen_importlib.FrozenImporter'>, <class '_frozen_importlib_external.PathFinder'>] modules = {'__main__': <module 'pydoc' from '/usr/lib/python3.6/pydoc.py'>, '_ast': <module '_ast' (built-in)>, '_bootlocale': <module '_bootlocale' from '/home/linkliman/Docu...s/Python/Python3.6/lib/python3.6/_bootlocale.py'>, '_codecs': <module '_codecs' (built-in)>, '_collections': <module '_collections' (built-in)>, '_collections_abc': <module '_collections_abc' from '/home/linkliman...hon/Python3.6/lib/python3.6/_collections_abc.py'>, '_frozen_importlib': <module 'importlib._bootstrap' (frozen)>, '_frozen_importlib_external': <module 'importlib._bootstrap_external' (frozen)>, '_functools': <module '_functools' (built-in)>, '_heapq': <module '_heapq' (built-in)>, ...} path = ['', '/home/linkliman/Documents/Python/Python3.6/lib/python36.zip', '/home/linkliman/Documents/Python/Python3.6/lib/python3.6', '/home/linkliman/Documents/Python/Python3.6/lib/python3.6/lib-dynload', '/usr/lib/python3.6', '/home/linkliman/Documents/Python/Python3.6/lib/python3.6/site-packages'] path_hooks = [<class 'zipimport.zipimporter'>, <function FileFinder.path_hook.<locals>.path_hook_for_FileFinder>] path_importer_cache = {'/home/linkliman/Documents/Python/Python3.6/Projects/TAL-Project': FileFinder('/home/linkliman/Documents/Python/Python3.6/Projects/TAL-Project'), '/home/linkliman/Documents/Python/Python3.6/lib/python3.6': FileFinder('/home/linkliman/Documents/Python/Python3.6/lib/python3.6'), '/home/linkliman/Documents/Python/Python3.6/lib/python3.6/collections': FileFinder('/home/linkliman/Documents/Python/Python3.6/lib/python3.6/collections'), '/home/linkliman/Documents/Python/Python3.6/lib/python3.6/encodings': FileFinder('/home/linkliman/Documents/Python/Python3.6/lib/python3.6/encodings'), '/home/linkliman/Documents/Python/Python3.6/lib/python3.6/importlib': FileFinder('/home/linkliman/Documents/Python/Python3.6/lib/python3.6/importlib'), '/home/linkliman/Documents/Python/Python3.6/lib/python3.6/lib-dynload': FileFinder('/home/linkliman/Documents/Python/Python3.6/lib/python3.6/lib-dynload'), '/home/linkliman/Documents/Python/Python3.6/lib/python3.6/site-packages': FileFinder('/home/linkliman/Documents/Python/Python3.6/lib/python3.6/site-packages'), '/home/linkliman/Documents/Python/Python3.6/lib/python36.zip': None, '/usr/lib/python3.6': FileFinder('/usr/lib/python3.6'), '/usr/lib/python3.6/urllib': FileFinder('/usr/lib/python3.6/urllib')} platform = 'linux' prefix = '/home/linkliman/Documents/Python/Python3.6' real_prefix = '/usr' stderr = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'> stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='UTF-8'> stdout = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'> thread_info = sys.thread_info(name='pthread', lock='semaphore', version='NPTL 2.27') version = '3.6.6 (default, Sep 12 2018, 18:26:19) \n[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]' version_info = sys.version_info(major=3, minor=6, micro=6, releaselevel='final', serial=0) warnoptions = [] |