Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-updates > by-pkgid > 50402eac2a16508b365658612a898528 > files > 860

python3-docs-3.3.0-4.3.mga3.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>26.13. venv — Creation of virtual environments &mdash; Python v3.3.0 documentation</title>
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '3.3.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python v3.3.0 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python v3.3.0 documentation" href="../index.html" />
    <link rel="up" title="26. Development Tools" href="development.html" />
    <link rel="next" title="27. Debugging and Profiling" href="debug.html" />
    <link rel="prev" title="26.11. test — Regression tests package for Python" href="test.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <script type="text/javascript" src="../_static/copybutton.js"></script>
 

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="debug.html" title="27. Debugging and Profiling"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="test.html" title="26.11. test — Regression tests package for Python"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="http://www.python.org/">Python</a> &raquo;</li>
        <li><a href="../index.html">3.3.0 Documentation</a> &raquo;</li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="development.html" accesskey="U">26. Development Tools</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-venv">
<span id="venv-creation-of-virtual-environments"></span><h1>26.13. <a class="reference internal" href="#module-venv" title="venv: Creation of virtual environments."><tt class="xref py py-mod docutils literal"><span class="pre">venv</span></tt></a> &#8212; Creation of virtual environments<a class="headerlink" href="#module-venv" title="Permalink to this headline">¶</a></h1>
<p class="versionadded" id="index-0">
<span class="versionmodified">New in version 3.3.</span> </p>
<p><strong>Source code:</strong> <a class="reference external" href="http://hg.python.org/cpython/file/3.3/Lib/venv.py">Lib/venv.py</a></p>
<hr class="docutils" />
<p>The <a class="reference internal" href="#module-venv" title="venv: Creation of virtual environments."><tt class="xref py py-mod docutils literal"><span class="pre">venv</span></tt></a> module provides support for creating lightweight &#8220;virtual
environments&#8221; with their own site directories, optionally isolated from system
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.</p>
<div class="section" id="creating-virtual-environments">
<h2>26.13.1. Creating virtual environments<a class="headerlink" href="#creating-virtual-environments" title="Permalink to this headline">¶</a></h2>
<p>Creation of <a class="reference internal" href="#venv-def"><em>virtual environments</em></a> is done by executing the
<tt class="docutils literal"><span class="pre">pyvenv</span></tt> script:</p>
<div class="highlight-python3"><div class="highlight"><pre><span class="n">pyvenv</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">new</span><span class="o">/</span><span class="n">virtual</span><span class="o">/</span><span class="n">environment</span>
</pre></div>
</div>
<p>Running this command creates the target directory (creating any parent
directories that don&#8217;t exist already) and places a <tt class="docutils literal"><span class="pre">pyvenv.cfg</span></tt> file in it
with a <tt class="docutils literal"><span class="pre">home</span></tt> key pointing to the Python installation the command was run
from.  It also creates a <tt class="docutils literal"><span class="pre">bin</span></tt> (or <tt class="docutils literal"><span class="pre">Scripts</span></tt> on Windows) subdirectory
containing a copy of the <tt class="docutils literal"><span class="pre">python</span></tt> binary (or binaries, in the case of
Windows).  It also creates an (initially empty) <tt class="docutils literal"><span class="pre">lib/pythonX.Y/site-packages</span></tt>
subdirectory (on Windows, this is <tt class="docutils literal"><span class="pre">Lib\site-packages</span></tt>).</p>
<p>On Windows, you may have to invoke the <tt class="docutils literal"><span class="pre">pyvenv</span></tt> script as follows, if you
don&#8217;t have the relevant PATH and PATHEXT settings:</p>
<div class="highlight-none"><div class="highlight"><pre>c:\Temp&gt;c:\Python33\python c:\Python33\Tools\Scripts\pyvenv.py myenv
</pre></div>
</div>
<p>or equivalently:</p>
<div class="highlight-none"><div class="highlight"><pre>c:\Temp&gt;c:\Python33\python -m venv myenv
</pre></div>
</div>
<p>The command, if run with <tt class="docutils literal"><span class="pre">-h</span></tt>, will show the available options:</p>
<div class="highlight-none"><div class="highlight"><pre>usage: pyvenv [-h] [--system-site-packages] [--symlinks] [--clear]
              [--upgrade] ENV_DIR [ENV_DIR ...]

Creates virtual Python environments in one or more target directories.

positional arguments:
  ENV_DIR             A directory to create the environment in.

optional arguments:
  -h, --help             show this help message and exit
  --system-site-packages Give access to the global site-packages dir to the
                         virtual environment.
  --symlinks             Try to use symlinks rather than copies, when symlinks
                         are not the default for the platform.
  --clear                Delete the environment directory if it already exists.
                         If not specified and the directory exists, an error is
                         raised.
  --upgrade              Upgrade the environment directory to use this version
                         of Python, assuming Python has been upgraded in-place.
</pre></div>
</div>
<p>If the target directory already exists an error will be raised, unless
the <tt class="docutils literal"><span class="pre">--clear</span></tt> or <tt class="docutils literal"><span class="pre">--upgrade</span></tt> option was provided.</p>
<p>The created <tt class="docutils literal"><span class="pre">pyvenv.cfg</span></tt> file also includes the
<tt class="docutils literal"><span class="pre">include-system-site-packages</span></tt> key, set to <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">venv</span></tt> is
run with the <tt class="docutils literal"><span class="pre">--system-site-packages</span></tt> option, <tt class="docutils literal"><span class="pre">false</span></tt> otherwise.</p>
<p>Multiple paths can be given to <tt class="docutils literal"><span class="pre">pyvenv</span></tt>, in which case an identical
virtualenv will be created, according to the given options, at each
provided path.</p>
<p>Once a venv has been created, it can be &#8220;activated&#8221; using a script in the
venv&#8217;s binary directory. The invocation of the script is platform-specific: on
a Posix platform, you would typically do:</p>
<div class="highlight-none"><div class="highlight"><pre>$ source &lt;venv&gt;/bin/activate
</pre></div>
</div>
<p>whereas on Windows, you might do:</p>
<div class="highlight-none"><div class="highlight"><pre>C:\&gt; &lt;venv&gt;/Scripts/activate
</pre></div>
</div>
<p>if you are using the <tt class="docutils literal"><span class="pre">cmd.exe</span></tt> shell, or perhaps:</p>
<div class="highlight-none"><div class="highlight"><pre>PS C:\&gt; &lt;venv&gt;/Scripts/Activate.ps1
</pre></div>
</div>
<p>if you use PowerShell.</p>
<p>You don&#8217;t specifically <em>need</em> to activate an environment; activation just
prepends the venv&#8217;s binary directory to your path, so that &#8220;python&#8221; invokes the
venv&#8217;s Python interpreter and you can run installed scripts without having to
use their full path. However, all scripts installed in a venv should be
runnable without activating it, and run with the venv&#8217;s Python automatically.</p>
<p>You can deactivate a venv by typing &#8220;deactivate&#8221; in your shell. The exact
mechanism is platform-specific: for example, the Bash activation script defines
a &#8220;deactivate&#8221; function, whereas on Windows there are separate scripts called
<tt class="docutils literal"><span class="pre">deactivate.bat</span></tt> and <tt class="docutils literal"><span class="pre">Deactivate.ps1</span></tt> which are installed when the venv is
created.</p>
<div class="admonition note" id="venv-def">
<p class="first admonition-title">Note</p>
<p>A virtual environment (also called a <tt class="docutils literal"><span class="pre">venv</span></tt>) 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 &#8220;system&#8221; Python,
i.e. one which is installed as part of your operating system.</p>
<p>A venv is a directory tree which contains Python executable files and
other files which indicate that it is a venv.</p>
<p>Common installation tools such as <tt class="docutils literal"><span class="pre">Distribute</span></tt> and <tt class="docutils literal"><span class="pre">pip</span></tt> 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.
Of course, you need to install them into the venv first: this could be
done by running <tt class="docutils literal"><span class="pre">distribute_setup.py</span></tt> with the venv activated,
followed by running <tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">pip</span></tt>. Alternatively, you could download
the source tarballs and run <tt class="docutils literal"><span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">install</span></tt> after unpacking,
with the venv activated.</p>
<p class="last">When a venv is active (i.e. the venv&#8217;s Python interpreter is running), the
attributes <a class="reference internal" href="sys.html#sys.prefix" title="sys.prefix"><tt class="xref py py-attr docutils literal"><span class="pre">sys.prefix</span></tt></a> and <a class="reference internal" href="sys.html#sys.exec_prefix" title="sys.exec_prefix"><tt class="xref py py-attr docutils literal"><span class="pre">sys.exec_prefix</span></tt></a> point to the base
directory of the venv, whereas <a class="reference internal" href="sys.html#sys.base_prefix" title="sys.base_prefix"><tt class="xref py py-attr docutils literal"><span class="pre">sys.base_prefix</span></tt></a> and
<a class="reference internal" href="sys.html#sys.base_exec_prefix" title="sys.base_exec_prefix"><tt class="xref py py-attr docutils literal"><span class="pre">sys.base_exec_prefix</span></tt></a> point to the non-venv Python installation
which was used to create the venv. If a venv is not active, then
<a class="reference internal" href="sys.html#sys.prefix" title="sys.prefix"><tt class="xref py py-attr docutils literal"><span class="pre">sys.prefix</span></tt></a> is the same as <a class="reference internal" href="sys.html#sys.base_prefix" title="sys.base_prefix"><tt class="xref py py-attr docutils literal"><span class="pre">sys.base_prefix</span></tt></a> and
<a class="reference internal" href="sys.html#sys.exec_prefix" title="sys.exec_prefix"><tt class="xref py py-attr docutils literal"><span class="pre">sys.exec_prefix</span></tt></a> is the same as <a class="reference internal" href="sys.html#sys.base_exec_prefix" title="sys.base_exec_prefix"><tt class="xref py py-attr docutils literal"><span class="pre">sys.base_exec_prefix</span></tt></a> (they
all point to a non-venv Python installation).</p>
</div>
</div>
<div class="section" id="api">
<h2>26.13.2. API<a class="headerlink" href="#api" title="Permalink to this headline">¶</a></h2>
<p>The high-level method described above makes use of a simple API which provides
mechanisms for third-party virtual environment creators to customize environment
creation according to their needs, the <a class="reference internal" href="#venv.EnvBuilder" title="venv.EnvBuilder"><tt class="xref py py-class docutils literal"><span class="pre">EnvBuilder</span></tt></a> class.</p>
<dl class="class">
<dt id="venv.EnvBuilder">
<em class="property">class </em><tt class="descclassname">venv.</tt><tt class="descname">EnvBuilder</tt><big>(</big><em>system_site_packages=False</em>, <em>clear=False</em>, <em>symlinks=False</em>, <em>upgrade=False</em><big>)</big><a class="headerlink" href="#venv.EnvBuilder" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#venv.EnvBuilder" title="venv.EnvBuilder"><tt class="xref py py-class docutils literal"><span class="pre">EnvBuilder</span></tt></a> class accepts the following keyword arguments on
instantiation:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">system_site_packages</span></tt> &#8211; a Boolean value indicating that the system Python
site-packages should be available to the environment (defaults to <tt class="xref docutils literal"><span class="pre">False</span></tt>).</li>
<li><tt class="docutils literal"><span class="pre">clear</span></tt> &#8211; a Boolean value which, if True, will delete any existing target
directory instead of raising an exception (defaults to <tt class="xref docutils literal"><span class="pre">False</span></tt>).</li>
<li><tt class="docutils literal"><span class="pre">symlinks</span></tt> &#8211; a Boolean value indicating whether to attempt to symlink the
Python binary (and any necessary DLLs or other binaries,
e.g. <tt class="docutils literal"><span class="pre">pythonw.exe</span></tt>), rather than copying. Defaults to <tt class="xref docutils literal"><span class="pre">True</span></tt> on Linux and
Unix systems, but <tt class="xref docutils literal"><span class="pre">False</span></tt> on Windows.</li>
<li><tt class="docutils literal"><span class="pre">upgrade</span></tt> &#8211; a Boolean value which, if True, will upgrade an existing
environment with the running Python - for use when that Python has been
upgraded in-place (defaults to <tt class="xref docutils literal"><span class="pre">False</span></tt>).</li>
</ul>
<p>Creators of third-party virtual environment tools will be free to use the
provided <tt class="docutils literal"><span class="pre">EnvBuilder</span></tt> class as a base class.</p>
<p>The returned env-builder is an object which has a method, <tt class="docutils literal"><span class="pre">create</span></tt>:</p>
<dl class="method">
<dt id="venv.EnvBuilder.create">
<tt class="descname">create</tt><big>(</big><em>env_dir</em><big>)</big><a class="headerlink" href="#venv.EnvBuilder.create" title="Permalink to this definition">¶</a></dt>
<dd><p>This method takes as required argument the path (absolute or relative to
the current directory) of the target directory which is to contain the
virtual environment.  The <tt class="docutils literal"><span class="pre">create</span></tt> method will either create the
environment in the specified directory, or raise an appropriate
exception.</p>
<p>The <tt class="docutils literal"><span class="pre">create</span></tt> method of the <tt class="docutils literal"><span class="pre">EnvBuilder</span></tt> class illustrates the hooks
available for subclass customization:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">create</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">env_dir</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Create a virtualized Python environment in a directory.</span>
<span class="sd">    env_dir is the target directory to create an environment in.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">env_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">env_dir</span><span class="p">)</span>
    <span class="n">context</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">create_directories</span><span class="p">(</span><span class="n">env_dir</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">create_configuration</span><span class="p">(</span><span class="n">context</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">setup_python</span><span class="p">(</span><span class="n">context</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">setup_scripts</span><span class="p">(</span><span class="n">context</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">post_setup</span><span class="p">(</span><span class="n">context</span><span class="p">)</span>
</pre></div>
</div>
<p>Each of the methods <a class="reference internal" href="#venv.EnvBuilder.create_directories" title="venv.EnvBuilder.create_directories"><tt class="xref py py-meth docutils literal"><span class="pre">create_directories()</span></tt></a>,
<a class="reference internal" href="#venv.EnvBuilder.create_configuration" title="venv.EnvBuilder.create_configuration"><tt class="xref py py-meth docutils literal"><span class="pre">create_configuration()</span></tt></a>, <a class="reference internal" href="#venv.EnvBuilder.setup_python" title="venv.EnvBuilder.setup_python"><tt class="xref py py-meth docutils literal"><span class="pre">setup_python()</span></tt></a>,
<a class="reference internal" href="#venv.EnvBuilder.setup_scripts" title="venv.EnvBuilder.setup_scripts"><tt class="xref py py-meth docutils literal"><span class="pre">setup_scripts()</span></tt></a> and <a class="reference internal" href="#venv.EnvBuilder.post_setup" title="venv.EnvBuilder.post_setup"><tt class="xref py py-meth docutils literal"><span class="pre">post_setup()</span></tt></a> can be overridden.</p>
</dd></dl>

<dl class="method">
<dt id="venv.EnvBuilder.create_directories">
<tt class="descname">create_directories</tt><big>(</big><em>env_dir</em><big>)</big><a class="headerlink" href="#venv.EnvBuilder.create_directories" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates the environment directory and all necessary directories, and
returns a context object.  This is just a holder for attributes (such as
paths), for use by the other methods.</p>
</dd></dl>

<dl class="method">
<dt id="venv.EnvBuilder.create_configuration">
<tt class="descname">create_configuration</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#venv.EnvBuilder.create_configuration" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates the <tt class="docutils literal"><span class="pre">pyvenv.cfg</span></tt> configuration file in the environment.</p>
</dd></dl>

<dl class="method">
<dt id="venv.EnvBuilder.setup_python">
<tt class="descname">setup_python</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#venv.EnvBuilder.setup_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a copy of the Python executable (and, under Windows, DLLs) in
the environment.</p>
</dd></dl>

<dl class="method">
<dt id="venv.EnvBuilder.setup_scripts">
<tt class="descname">setup_scripts</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#venv.EnvBuilder.setup_scripts" title="Permalink to this definition">¶</a></dt>
<dd><p>Installs activation scripts appropriate to the platform into the virtual
environment.</p>
</dd></dl>

<dl class="method">
<dt id="venv.EnvBuilder.post_setup">
<tt class="descname">post_setup</tt><big>(</big><em>context</em><big>)</big><a class="headerlink" href="#venv.EnvBuilder.post_setup" title="Permalink to this definition">¶</a></dt>
<dd><p>A placeholder method which can be overridden in third party
implementations to pre-install packages in the virtual environment or
perform other post-creation steps.</p>
</dd></dl>

<p>In addition, <a class="reference internal" href="#venv.EnvBuilder" title="venv.EnvBuilder"><tt class="xref py py-class docutils literal"><span class="pre">EnvBuilder</span></tt></a> provides this utility method that can be
called from <a class="reference internal" href="#venv.EnvBuilder.setup_scripts" title="venv.EnvBuilder.setup_scripts"><tt class="xref py py-meth docutils literal"><span class="pre">setup_scripts()</span></tt></a> or <a class="reference internal" href="#venv.EnvBuilder.post_setup" title="venv.EnvBuilder.post_setup"><tt class="xref py py-meth docutils literal"><span class="pre">post_setup()</span></tt></a> in subclasses to
assist in installing custom scripts into the virtual environment.</p>
<dl class="method">
<dt id="venv.EnvBuilder.install_scripts">
<tt class="descname">install_scripts</tt><big>(</big><em>context</em>, <em>path</em><big>)</big><a class="headerlink" href="#venv.EnvBuilder.install_scripts" title="Permalink to this definition">¶</a></dt>
<dd><p><em>path</em> is the path to a directory that should contain subdirectories
&#8220;common&#8221;, &#8220;posix&#8221;, &#8220;nt&#8221;, each containing scripts destined for the bin
directory in the environment.  The contents of &#8220;common&#8221; and the
directory corresponding to <a class="reference internal" href="os.html#os.name" title="os.name"><tt class="xref py py-data docutils literal"><span class="pre">os.name</span></tt></a> are copied after some text
replacement of placeholders:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">__VENV_DIR__</span></tt> is replaced with the absolute path of the environment
directory.</li>
<li><tt class="docutils literal"><span class="pre">__VENV_NAME__</span></tt> is replaced with the environment name (final path
segment of environment directory).</li>
<li><tt class="docutils literal"><span class="pre">__VENV_BIN_NAME__</span></tt> is replaced with the name of the bin directory
(either <tt class="docutils literal"><span class="pre">bin</span></tt> or <tt class="docutils literal"><span class="pre">Scripts</span></tt>).</li>
<li><tt class="docutils literal"><span class="pre">__VENV_PYTHON__</span></tt> is replaced with the absolute path of the
environment&#8217;s executable.</li>
</ul>
</dd></dl>

</dd></dl>

<p>There is also a module-level convenience function:</p>
<dl class="function">
<dt id="venv.create">
<tt class="descclassname">venv.</tt><tt class="descname">create</tt><big>(</big><em>env_dir</em>, <em>system_site_packages=False</em>, <em>clear=False</em>, <em>symlinks=False</em><big>)</big><a class="headerlink" href="#venv.create" title="Permalink to this definition">¶</a></dt>
<dd><p>Create an <a class="reference internal" href="#venv.EnvBuilder" title="venv.EnvBuilder"><tt class="xref py py-class docutils literal"><span class="pre">EnvBuilder</span></tt></a> with the given keyword arguments, and call its
<a class="reference internal" href="#venv.EnvBuilder.create" title="venv.EnvBuilder.create"><tt class="xref py py-meth docutils literal"><span class="pre">create()</span></tt></a> method with the <em>env_dir</em> argument.</p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">26.13. <tt class="docutils literal"><span class="pre">venv</span></tt> &#8212; Creation of virtual environments</a><ul>
<li><a class="reference internal" href="#creating-virtual-environments">26.13.1. Creating virtual environments</a></li>
<li><a class="reference internal" href="#api">26.13.2. API</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="test.html"
                        title="previous chapter">26.11. <tt class="docutils literal docutils literal docutils literal"><span class="pre">test</span></tt> &#8212; Regression tests package for Python</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="debug.html"
                        title="next chapter">27. Debugging and Profiling</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
  <li><a href="../bugs.html">Report a Bug</a></li>
  <li><a href="../_sources/library/venv.txt"
         rel="nofollow">Show Source</a></li>
</ul>

<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="debug.html" title="27. Debugging and Profiling"
             >next</a> |</li>
        <li class="right" >
          <a href="test.html" title="26.11. test — Regression tests package for Python"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="http://www.python.org/">Python</a> &raquo;</li>
        <li><a href="../index.html">3.3.0 Documentation</a> &raquo;</li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="development.html" >26. Development Tools</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2012, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.  
    <a href="http://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Sep 29, 2012.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>

  </body>
</html>