Easy Install Virtual Python

There are always questions about non-root installations of TurboGears. Fortunately the Easy Install documentation has a section that explains the various options available. I chose to create a virtual Python in ~/vpython/. This seems to work well for me except that to use the virtual Python interpreter I have to use ~/vpython/bin/python. I have create 2 very simple Bash functions to allow me to quickly alias and unalias python.
# Virtual Python function virpy_on() { alias python=~/vpython/bin/python; } function virpy_off() { unalias python; } virpy_on # turn on by default
Typing 'virpy_on' or 'virpy_off' at the Bash prompt aliases or unaliases python respectively. The alias is on by default.
blog comments powered by Disqus