-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
virtualenv-api is quite useful. Thanks.
I presume it's possible to use a VirtualEnvironment() from the Python that created the VirtualEnvironment(). The code would look like this, for example:
env = VirtualEnvironment('/path/to/environment/name')
env.install('package_foo')
# modify sys.path to use env
# now import in env's context
import bar
# perhaps modify sys.path to stop using env
If so, these two methods would be helpful:
env.activate() # modify sys.path so that imports occur in env's context
env.deactivate() # undo env.activate()
Thanks, Arthur
Metadata
Metadata
Assignees
Labels
No labels