command line tool to find Python source of a module or object
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pysrc.py
readme.md

readme.md

example uses:

vim $(pysrc inspect)

vimdiff $(pysrc ast.literal_eval -p python2 -p python3)

To use tab completion, add

complete -C 'pysrc --get-bash-completion' pysrc

For a command that opens the files immediately, try

complete -C 'pysrc --get-bash-completion' pyedit
function pyedit (){
    vim -O $(pysrc "$@")
}