Diagramming code

Andrea Crotti andrea.crotti.0 at gmail.com
Mon Jul 16 16:41:31 EDT 2012


On 07/16/2012 02:26 AM, hamilton wrote:
> Is there any software to help understand python code ?
>
> Thanks
>
> hamilton

Sometimes to get some nice graphs I use gprof2dot 
(http://code.google.com/p/jrfonseca/wiki/Gprof2Dot)
or doxygen (http://www.stack.nl/~dimitri/doxygen/)

gprof2dot analyses the output of the profiling that you get running the 
code through the python profiler,
doing for example:

python -m cProfile -o $STATS $FNAME $@
$GPROF2DOT -f pstats $STATS | dot -T$TYPE -o $OUT

doxygen is more useful for C++ but it's also able to infer a few things 
(without running) from a python project..



More information about the Python-list mailing list