If I you find bugs, things missing, etc. mail me (er at cs.brown.edu).
Superceded: Aric Hagberg and Dan Schult kindly include my name as co-author, but they deserve all the credit for this much more polished version.
This interface consists of a swig specification (gv.i), and a python interface file (__init__.py). You also need the sources from cdt and agraph (from graphviz).
Run swig on gv.i (swig -python gv.i). Compile the output the way you would for any other python shared library, with extra include directories for agraph and cdt. Call it gv.o. Compile the cdt files and the agraph files as shared. Link them together with gv.o as a shared library (graphviz.so). Make an Agraph directory under your PYTHONPATH somewhere. Put graphviz.so and __init__.py under it. You should be all set.
Sample Makefile. You can do better than it by not being lazy.
Christian Lindig wrote a C program to do concept analysis. I created a python interface around it, but in the process I also had to make small changes to Christian's program. Here is the whole thing. You need (surprise, surprise) swig.
Python does not provide a hook to realpath(3C). Here is a swig file to give you a PyRealpath module with a pyrealpath method. Same build process as for the python interface to agraph.