command line tool to find Python source of a module or object
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

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 "$@")