September 2026
1051 pages
35h 4m
English
The sys module of the standard library provides predefined variables and functions related or closely related to the Python interpreter. For example, you can use the sys module to query the version number of the interpreter or the operating system. The module provides the programmer with a range of information that can sometimes be very useful.
To run the examples in this section, you must first import the sys module:
>>> import sys
The sys.argv list contains the command line parameters with which the Python program was called. argv[0] is the name of the program itself. Consider the exemplary $ program.py -blah 0 -bubble abc program call. Here, argv references ...
Read now
Unlock full access