Skip to content

Instantly share code, notes, and snippets.

@devmanhinton
Created April 30, 2015 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devmanhinton/b360be3595e8f3599074 to your computer and use it in GitHub Desktop.
Save devmanhinton/b360be3595e8f3599074 to your computer and use it in GitHub Desktop.
Auto Start ClassPath virtualenv
This is for zsh so you might have to change for other shells but general idea is the same
Note: Change 'ClassPath' to the root of your project
chpwd () {
case $PWD in
*ClassPath*)
python -c 'import sys; print sys.real_prefix' 2>/dev/null 1>/dev/null || source bin/activate
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment