Skip to content

Instantly share code, notes, and snippets.

@tripleee
Created July 2, 2015 07:24
Show Gist options
  • Save tripleee/a74d5e3f05b1cf5c673b to your computer and use it in GitHub Desktop.
Save tripleee/a74d5e3f05b1cf5c673b to your computer and use it in GitHub Desktop.
activate function for virtualenv
# Add this to your .bash_profile or similar
activate ()
{
test -d "$1" && test -r "$1/bin/activate" && . "$1/bin/activate" && return;
echo "activate: $1 does not look like a valid virtualenv" 1>&2;
return 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment