diff options
Diffstat (limited to 'Doc/using')
-rw-r--r-- | Doc/using/cmdline.rst | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 3fe405a88b..ba3e1c9c43 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -142,6 +142,14 @@ Miscellaneous options option is given twice (:option:`-bb`). +.. cmdoption:: -B + + If given, Python won't try to write ``.pyc`` or ``.pyo`` files on the + import of source modules. See also :envvar:`PYTHONDONTWRITEBYTECODE`. + + .. versionadded:: 2.6 + + .. cmdoption:: -d Turn on parser debugging output (for wizards only, depending on compilation @@ -284,6 +292,8 @@ Miscellaneous options Environment variables --------------------- +These environment variables influence Python's behavior. + .. envvar:: PYTHONHOME Change the location of the standard Python libraries. By default, the @@ -299,7 +309,7 @@ Environment variables .. envvar:: PYTHONPATH - Augments the default search path for module files. The format is the same as + Augment the default search path for module files. The format is the same as the shell's :envvar:`PATH`: one or more directory pathnames separated by colons. Non-existent directories are silently ignored. @@ -349,6 +359,9 @@ Environment variables If this is set to a non-empty string it is equivalent to specifying the :option:`-i` option. + This variable can also be modified by Python code using :data:`os.environ` + to force inspect mode on program termination. + .. envvar:: PYTHONUNBUFFERED @@ -368,3 +381,43 @@ Environment variables If this is set, Python ignores case in :keyword:`import` statements. This only works on Windows. + +.. envvar:: PYTHONDONTWRITEBYTECODE + + If this is set, Python won't try to write ``.pyc`` or ``.pyo`` files on the + import of source modules. + + .. versionadded:: 2.6 + + +.. envvar:: PYTHONEXECUTABLE + + If this environment variable is set, ``sys.argv[0]`` will be set to its + value instead of the value got through the C runtime. Only works on + MacOS X. + + +Debug-mode variables +~~~~~~~~~~~~~~~~~~~~ + +Setting these variables only has an effect in a debug build of Python, that is, +if Python was configured with the :option:`--with-pydebug` build option. + +.. envvar:: PYTHONTHREADDEBUG + + If set, Python will print debug threading debug info. + + .. versionchanged:: 2.6 + Previously, this variable was called ``THREADDEBUG``. + +.. envvar:: PYTHONDUMPREFS + + If set, Python will dump objects and reference counts still alive after + shutting down the interpreter. + + +.. envvar:: PYTHONMALLOCSTATS + + If set, Python will print memory allocation statistics every time a new + object arena is created, and on shutdown. + |