This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Virtualenv without shell scripts.

No more “cd dir ; bin/activate”. Pure python scripts using virtualenv.


import ve

import ... # from virtualenv

... code to run in virtualenv ...


from ve import venv

with venv():
    import ... # from virtualenv
    ... code to run in virtualenv ...

with venv(other_vdir):
    ... code to run in a different virtualenv ...

... code to run outside of virtualenv ...

This module should be installed system wide, not in any virtualenv.

If no virtualenv directory is supplied to activate() or venv(), this module will search the calling module’s dir and then its parent dirs for a dir named ‘virtualenv’. See virtualenv_dir().

For maintainers: This module should never have any imports except from the standard python library. This allows you to import this module, activate a virtualenv, and then import other modules from that virtualenv.

Do not import anything non-standard in this module at global scope. If you really need a non-standard import, import in a local scope. Example:

_log = None
def log(message):
    global _log
    # delayed non-global import, still takes effect globally
    from syr.log import get_log
    _log = get_log('ve.log')

This module is not named virtualenv because that module is part of the virtualenv program itself.

To do:
Check whether we are already in an activated virtualenv.
Copyright 2011-2013 Released under the Creative Commons Attribution license. Last modified: 2013-03-21
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting