Skip to content

Instantly share code, notes, and snippets.

@simonwhitaker
Created May 18, 2011 20:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonwhitaker/979481 to your computer and use it in GitHub Desktop.
Save simonwhitaker/979481 to your computer and use it in GitHub Desktop.
pymod - Python one-liner for finding the location on disk of a given Python module. Stick it in your .bashrc or whatever for instant pymod joy.
# pymod MOD: find file path to implementation for python module called MOD
alias pymod="python -c 'import sys; print(__import__(sys.argv[1]).__file__)'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment