Skip to content

Instantly share code, notes, and snippets.

@slor
Created August 25, 2011 18:04
Show Gist options
  • Save slor/1171311 to your computer and use it in GitHub Desktop.
Save slor/1171311 to your computer and use it in GitHub Desktop.
Add your pydev workspace projects to your pythonpath when activating with virtualenvwrapper
# Assuming your workspace is called "workspace" and at the root of your virtualenv
# In $WORKON_HOME/postactivate
###############################
export PREACTIVATE_PYTHONPATH=$PYTHONPATH
for f in $VIRTUAL_ENV/workspace/*
do
export PYTHONPATH=$PYTHONPATH:$f
done
# In $WORKON_HOME/predeactivate
###############################
export PYTHONPATH=$PREACTIVATE_PYTHONPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment