First page Back Continue Last page Overview Graphics

Command Line Parameters

The sys Module alos contains the command line parameters.

The are in the list sys.argv

The following two commands are enough to print out the command line parameters:

import sys

print sys.argv

If they are saved in a file par_test.py and called, we get the following result:

$ par_test.py erstes zweites drittes Argument

['par_test.py', 'erstes', 'zweites', 'drittes', 'Argument']