summaryrefslogtreecommitdiffstats
path: root/Doc/using
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-07-09 09:37:01 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-07-09 09:37:01 (GMT)
commitcd9b746b37fae46df2a8b669b5965272ab565ff8 (patch)
treedc9322c0ce6c1e2adf4ad247b8141f7f6e69a332 /Doc/using
parent6dc9f0eca7ac25519b4dd54de48d0ba1af56344f (diff)
downloadcpython-cd9b746b37fae46df2a8b669b5965272ab565ff8.zip
cpython-cd9b746b37fae46df2a8b669b5965272ab565ff8.tar.gz
cpython-cd9b746b37fae46df2a8b669b5965272ab565ff8.tar.bz2
Added cross-references to venv definition.
Diffstat (limited to 'Doc/using')
-rw-r--r--Doc/using/scripts.rst28
1 files changed, 3 insertions, 25 deletions
diff --git a/Doc/using/scripts.rst b/Doc/using/scripts.rst
index 08fcfd6..3b58cae 100644
--- a/Doc/using/scripts.rst
+++ b/Doc/using/scripts.rst
@@ -6,8 +6,8 @@ Additional Tools and Scripts
pyvenv - Creating virtual environments
--------------------------------------
-Creation of virtual environments is done by executing the ``pyvenv``
-script::
+Creation of :ref:`virtual environments <venv-def>` is done by executing the
+``pyvenv`` script::
pyvenv /path/to/new/virtual/environment
@@ -72,7 +72,7 @@ a Posix platform, you would typically do::
whereas on Windows, you might do::
- c:\> <venv>/Scripts/activate
+ C:\> <venv>/Scripts/activate
if you are using the ``cmd.exe`` shell, or perhaps::
@@ -92,25 +92,3 @@ a "deactivate" function, whereas on Windows there are separate scripts called
``deactivate.bat`` and ``Deactivate.ps1`` which are installed when the venv is
created.
-.. note:: A virtual environment (also called a ``venv``) is a Python
- environment such that the Python interpreter, libraries and scripts
- installed into it are isolated from those installed in other virtual
- environments, and (by default) any libraries installed in a "system" Python,
- i.e. one which is installed as part of your operating system.
-
- A venv is a directory tree which contains Python executable files and
- other files which indicate that it is a venv.
-
- Common installation tools such as ``distribute`` and ``pip`` work as
- expected with venvs - i.e. when a venv is active, they install Python
- packages into the venv without needing to be told to do so explicitly.
-
- When a venv is active (i.e. the venv's Python interpreter is running), the
- attributes :attr:`sys.prefix` and :attr:`sys.exec_prefix` point to the base
- directory of the venv, whereas :attr:`sys.base_prefix` and
- :attr:`sys.base_exec_prefix` point to the non-venv Python installation
- which was used to create the venv. If a venv is not active, then
- :attr:`sys.prefix` is the same as :attr:`sys.base_prefix` and
- :attr:`sys.exec_prefix` is the same as :attr:`sys.base_exec_prefix` (they
- all point to a non-venv Python installation).
-