Tag Archives: bash

Quickly open the source of a Python module from the command-line

Add this to your .bashrc: pysource() { $EDITOR $(python -c "import ${1}; import inspect; print inspect.getsourcefile(${1})") } Your favorite editor should pop up and you can browse the module source. If you want to open a module from an existing … Continue reading

Posted in Programming | Tagged , | View Comments