Skip to content

Instantly share code, notes, and snippets.

@wraithan
Created September 14, 2011 23:31
Show Gist options
  • Save wraithan/1218107 to your computer and use it in GitHub Desktop.
Save wraithan/1218107 to your computer and use it in GitHub Desktop.
@contextmanager
def virtualenv():
with prefix(env.activate):
yield
env.activate = 'source /srv/beehive/.virtualenvs/beehive/bin/activate'
def meh():
with virtualenv():
run('./manage.py do crap')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment