Skip to content

Commit 98c5d6d

Browse files
committed
added lssitepackages command
1 parent eb1b369 commit 98c5d6d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

virtualenvwrapper_bashrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,18 @@ function cdvirtualenv () {
295295
virtualenvwrapper_verify_active_environment || return 1
296296
cd $VIRTUAL_ENV/$1
297297
}
298+
299+
#
300+
# lssitepackages
301+
#
302+
# Shows the content of the site-packages directory of the currently-active
303+
# virtualenv
304+
#
305+
306+
function lssitepackages () {
307+
virtualenvwrapper_verify_active_environment || return 1
308+
pyvers="`python -c 'import sys; print sys.version[:3]'`"
309+
site_packages="lib/python${pyvers}/site-packages"
310+
echo "$VIRTUAL_ENV/$site_packages"
311+
ls -l $VIRTUAL_ENV/$site_packages
312+
}

0 commit comments

Comments
 (0)