Andy McKay

Jun 24, 2008

Where is that python module again?


For people like me with multiple pythons installations and can never remember his current modules are installed, I added the simple script, where-python:

python -c "import $1; import os; print os.path.dirname($1.__file__)"

And hence:

$ where-python django
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django