diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-05-26 02:45:29 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-05-26 02:45:29 (GMT) |
commit | 7ded1f0f694f0f99252ea19eca18b74ea5e36cb0 (patch) | |
tree | 1f07c57fddc9627f3d506b7a8d25ded561f5a2e0 /Doc/library/sys.rst | |
parent | f2bdc3690a59ca2af3f2fa82f506350874ff1467 (diff) | |
download | cpython-7ded1f0f694f0f99252ea19eca18b74ea5e36cb0.zip cpython-7ded1f0f694f0f99252ea19eca18b74ea5e36cb0.tar.gz cpython-7ded1f0f694f0f99252ea19eca18b74ea5e36cb0.tar.bz2 |
Implemented PEP 405 (Python virtual environments).
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r-- | Doc/library/sys.rst | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 96450c5..1ba9005 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -29,6 +29,26 @@ always available. command line, see the :mod:`fileinput` module. +.. data:: base_exec_prefix + + Set during Python startup, before ``site.py`` is run, to the same value as + :data:`exec_prefix`. If not running in a virtual environment, the values + will stay the same; if ``site.py`` finds that a virtual environment is in + use, the values of :data:`prefix` and :data:`exec_prefix` will be changed to + point to the virtual environment, whereas :data:`base_prefix` and + :data:`base_exec_prefix` will remain pointing to the base Python + installation (the one which the virtual environment was created from). + +.. data:: base_prefix + + Set during Python startup, before ``site.py`` is run, to the same value as + :data:`prefix`. If not running in a virtual environment, the values + will stay the same; if ``site.py`` finds that a virtual environment is in + use, the values of :data:`prefix` and :data:`exec_prefix` will be changed to + point to the virtual environment, whereas :data:`base_prefix` and + :data:`base_exec_prefix` will remain pointing to the base Python + installation (the one which the virtual environment was created from). + .. data:: byteorder An indicator of the native byte order. This will have the value ``'big'`` on @@ -199,6 +219,10 @@ always available. installed in :file:`{exec_prefix}/lib/python{X.Y}/lib-dynload`, where *X.Y* is the version number of Python, for example ``3.2``. + .. note:: If a virtual environment is in effect, this value will be changed + in ``site.py`` to point to the virtual environment. The value for the + Python installation will still be available, via :data:`base_exec_prefix`. + .. data:: executable @@ -775,6 +799,10 @@ always available. stored in :file:`{prefix}/include/python{X.Y}`, where *X.Y* is the version number of Python, for example ``3.2``. + .. note:: If a virtual environment is in effect, this value will be changed + in ``site.py`` to point to the virtual environment. The value for the + Python installation will still be available, via :data:`base_prefix`. + .. data:: ps1 ps2 |