I need to visually inspect object dependencies in some python code to find a memory leak. I'm trying to use objgraph, but running into problems because one of its dependencies, xdot, requires gobject, and I can't find where to get it for osx. This is what I'm getting:
(Pdb++) import objgraph;
objgraph.show_backrefs(objgraph.by_type("list")[0:50])
Graph written to /var/folders/64/dx79x1dj7d5g5ly8c64r5yp40000gn/T/objgraph-j9kxbmo6.dot (84 nodes)
Spawning graph viewer (xdot)
(Pdb++) Traceback (most recent call last):
File "/Users/bin/xdot", line 7, in <module>
from xdot import main
File "/Users/lib/python3.4/site-packages/xdot.py", line 33, in <module>
import gobject
ImportError: No module named 'gobject'
Is there a fix for this error on osx? Or are there alternatives to objgraph that will work properly on osx?