June 2025
Beginner to intermediate
473 pages
13h 30m
English
This section focuses on some basic system functions, many of which are located in the sys module, which must be included via import. Simply enter the following command:
import sys
sys.argv contains the list of all parameters passed to a Python script. You must note that the first list element contains the program name, which you usually do not want to evaluate. The easiest way to access the remaining elements is then via sys.argv[1:].
sys.stdin and sys.stdout contain file objects that you can use to output data to standard output or read data from standard input. The same functions are available as for ordinary files ( ...
Read now
Unlock full access