Gere
Gere

Reputation: 12697

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?

Upvotes: 6

Views: 354

Answers (1)

Thomas K
Thomas K

Reputation: 40340

(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.

Upvotes: 6

Related Questions