Module py2dot
source code
Create a dot file from a Python file.
Read a Python files and create a dot file of the function used and
called. Imported modules are scanned too, up to a user-defined level of
recursion. The dot file can be viewed with Graphviz.
The basic usage is:
$> ./py2dot -f filename.py | dot -Tpng | display
For command line options, type:
$> ./py2dot -h
Inside a Python shell:
>>> import py2dot
>>> infile = open('test.py', 'r')
>>> reclevel = 1
>>> data = py2dot.FileInput(infile, maxreclevel=reclevel)
>>> print data
|
|
|
|
|
|
|
|
|
|
|
recapply(ast,
cls,
data)
Iteratively apply a class constructor to the parser list. |
source code
|
|