Python Sys Module
System-specific parameters and functions — argv, path, exit. This category documents 22 Python sys module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: sys.argv, sys.exit(), sys.path, sys.version, sys.platform, sys.stdin, sys.stdout, sys.stderr, sys.getsizeof(), sys.setrecursionlimit(), sys.getrecursionlimit(), sys.modules, sys.executable, sys.float_info, sys.int_info, sys.call_tracing(), sys.displayhook(), sys.exc_info(), sys.settrace(), sys.setprofile(), sys.getrefcount(), sys.intern(). sys.argv a list of command-line arguments passed to a Python script. sys.argv[0] is the script name. sys.exit() exits the interpreter by raising SystemExit. arg can be an integer (exit code) or a string. sys.path a list of module search paths. Can be modified to add import directories. sys.version a string containing the Python interpreter version. sys.platform a string identifying the platform ("linux", "win32", "darwin").