Source

dotfiles / .bash_pyfuncs

Full commit
export OLD_PATH=$PATH


update_python_switchers()
{
    python $HOME/bin/update_python_switchers.py --use-fancy-prompt
}


if [ -f $HOME/.python_switchers.sh ] ; then
    . $HOME/.python_switchers.sh
else
    update_python_switchers
fi

## virtualenvwrapper
if [ $USER == sevas ]; then
    export WORKON_HOME=$HOME/.virtualenvs
    source /usr/local/bin/virtualenvwrapper.sh
    export TMPDIR=/tmp
fi

#export WORKON_HOME=$HOME/.virtualenvs
#source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh




## cd to module directory
cdp() 
{
    cd "$(python -c "import os.path as _, ${1}; print _.dirname(_.realpath(${1}.__file__[:-1]))")"
}