Skip to content

Instantly share code, notes, and snippets.

@zmsmith
Created April 28, 2012 16:49
Show Gist options
  • Save zmsmith/2520172 to your computer and use it in GitHub Desktop.
Save zmsmith/2520172 to your computer and use it in GitHub Desktop.
Quick bash helper for reading python source code
function open_module() {
mate `python -c "import $1 as mod; print (mod.__file__[:-12] if '__init__' in mod.__file__ else mod.__file__[:-1])"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment