summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2013-09-06 08:50:43 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2013-09-06 08:50:43 (GMT)
commita704582002ac621080cdbbfbe46eb7faf3393313 (patch)
tree937e4ca9d727f16ae35f15afb13162d7f9683c82
parent324ae385fe225ce31ae3c9aacc4106948c54740e (diff)
downloadcpython-a704582002ac621080cdbbfbe46eb7faf3393313.zip
cpython-a704582002ac621080cdbbfbe46eb7faf3393313.tar.gz
cpython-a704582002ac621080cdbbfbe46eb7faf3393313.tar.bz2
Issue #18939: Updated venv documentation with some clarifications.
-rw-r--r--Doc/library/venv.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst
index 80c75c2..28962d3 100644
--- a/Doc/library/venv.rst
+++ b/Doc/library/venv.rst
@@ -21,6 +21,7 @@ site directories. Each virtual environment has its own Python binary (allowing
creation of environments with various Python versions) and can have its own
independent set of installed Python packages in its site directories.
+See :pep:`405` for more information about Python virtual environments.
Creating virtual environments
-----------------------------
@@ -61,6 +62,19 @@ Creating virtual environments
ignored from all distutils configuration files to prevent projects being
inadvertently installed outside of the virtual environment.
+ When working in a command shell, users can make a venv active by running an
+ ``activate`` script in the venv's executables directory (the precise filename
+ is shell-dependent), which prepends the venv's directory for executables to
+ the ``PATH`` environment variable for the running shell. There should be no
+ need in other circumstances to activate a venv -- scripts installed into
+ venvs have a shebang line which points to the venv's Python interpreter. This
+ means that the script will run with that interpreter regardless of the value
+ of ``PATH``. On Windows, shebang line processing is supported if you have the
+ Python Launcher for Windows installed (this was added to Python in 3.3 - see
+ :pep:`397` for more details). Thus, double-clicking an installed script in
+ a Windows Explorer window should run the script with the correct interpreter
+ without there needing to be any reference to its venv in ``PATH``.
+
API
---