Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add pypidir function.

To get directory of installed python package.
  • Loading branch information...
commit 49088e6958c24fa83208926e3e425d8a7db2e1e5 1 parent ed0340e
@blaix authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 home/.bash_profile
View
7 home/.bash_profile
@@ -92,3 +92,10 @@ alias cd=pvm_cd
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
export VIRTUALENV_USE_DISTRIBUTE=true
+
+pypidir() {
+ # From http://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory
+ package_dir=`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
+
+ echo "$package_dir/$1"
+}
Please sign in to comment.
Something went wrong with that request. Please try again.