diff --git a/.bash_aliases b/.bash_aliases index 42cb842..e9e866f 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -46,3 +46,14 @@ function fuck() { echo ; echo " (╯°□°)╯︵$(echo "$2"|toilet -f term -F rotate)"; echo fi } + +#20140614 wrapper around bpython to load the virtualenv's python path +bpython() { + if test -n "$VIRTUAL_ENV" + then + PYTHONPATH="$(python -c 'import sys; print ":".join(sys.path)')" \ + command bpython "$@" + else + command bpython "$@" + fi +}