http://tarind.com/depgraph.html
Generate python module dependency graphs using dot (graphviz package)
-$ python py2depgraph.py path/to/my/script.py | python depgraph2dot.py | dot -T png -o depgraph.png
+$ py2depgraph.py path/to/my/script.py | depgraph2dot.py | dot -T png -o depgraph.png
I added some code to also save the path of any modules,
so it would be easier to only print modules with particular paths,