Skip to content

Instantly share code, notes, and snippets.

@alexmacedo
Created September 22, 2011 15:29
Show Gist options
  • Save alexmacedo/1235067 to your computer and use it in GitHub Desktop.
Save alexmacedo/1235067 to your computer and use it in GitHub Desktop.
shell functions to facilitate virtualenv use
workon()
{
if [ $# -eq 0 ]; then
echo Pass a environment to load.
return
fi
source ~/environments/$1/bin/activate
}
create-env()
{
if [ $# -eq 0 ]; then
echo A name is required to create environment.
return
fi
virtualenv --no-site-packages ~/environments/$1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment