Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show objects and references graphically in Python

I have objects which have an attribute containing a list of references to other objects (basically a network data structure). For debugging I'd like to see how objects are referenced.

Do you know a tool that can display this graphically?

like image 531
Gerenuk Avatar asked Jan 25 '12 12:01

Gerenuk


1 Answers

(Reposting as an answer)

objgraph ( http://mg.pov.lt/objgraph/ ) uses Graphviz to render graphs (as in networks, not plots) of Python objects. (On PyPI). It works with Python 2 or 3. Its homepage has several examples of how to use it.

I don't know of any alternatives, but I haven't spent long looking.

like image 56
Thomas K Avatar answered Oct 26 '22 04:10

Thomas K