O'Reilly logo

Python: Essential Reference, Third Edition by David Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interpreter Options and Environment

The interpreter has a number of options that control its runtime behavior and environment. Options are given to the interpreter on the command line as follows:

python [options] [-c cmd | filename | - ] [args]

Here’s a list of the available command-line options:

OptionDescription
-dGenerates parser debugging information.
-EIgnores environment variables.
-hPrints a list of all available command-line options.
-iEnters interactive mode after program execution.
-m moduleRuns library module module as a script.
-OOptimized mode.
-OOOptimized mode plus removal of documentation strings.
-Q argSpecifies the behavior of the division operator. One of -Qold (the default), -Qnew, -Qwarn, or -Qwarnall.
-SPrevents inclusion of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required