Created
November 3, 2010 15:53
-
-
Save sevas/661253 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export OLD_PATH=$PATH | |
# switching functions | |
select_epd62() | |
{ | |
echo "Setting environment for EPD 6.2 (Python 2.6)" | |
PATH="/Library/Frameworks/Python.framework/Versions/6.2/bin:${OLD_PATH}" | |
export PATH | |
} | |
select_macpython26() | |
{ | |
echo "Setting environment for MacPython 2.6" | |
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${OLD_PATH}" | |
export PATH | |
} | |
select_system_python26() | |
{ | |
echo "Setting environment for System Python 2.6" | |
PATH="/System/Library/Frameworks/Python.framework/Versions/2.6/bin/:${OLD_PATH}" | |
export PATH | |
} | |
## virtualenvwrapper | |
export WORKON_HOME=$HOME/.virtualenvs | |
source /Library/Frameworks/Python.framework/Versions/2.6/bin/virtualenvwrapper.sh | |
## cd to module directory | |
cdp() | |
{ | |
cd "$(python -c "import os.path as _, ${1}; print _.dirname(_.realpath(${1}.__file__[:-1]))")" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment