Tools/libraries to determine the call graph(call flow) of an python program (module/package)

ashish ashish.makani at gmail.com
Tue Jan 12 04:07:29 EST 2016


Hi Folks,

I am trying to do the following.

I have a moderately complex python module/application X, whose source code i have access to.

I run X with the following command

python x.py <arg1> <arg2> ... <argn>


Internally, x.py callls y.py, which in turn calls z.py, etc etc

x.py ---> y.py ---> z.py ---> u.py ---> v.py

Is there a python library/tool/module , to which i give input the start point of X, x.py
and the input arguments, arg1, arg2, ..., argn

and which can come up with the call graph of X

I have tried looking at pycallgraph[0], but havent had much luck with it.
0. https://pypi.python.org/pypi/pycallgraph

Any suggestions,advice, pointers welcome.

Thanks a ton,
ashish


"Talk is cheap. Show me the code."    
     - Linus Torvalds [ https://lkml.org/lkml/2000/8/25/132 ]



More information about the Python-list mailing list