DiaCanvas2 has a Python wrapper. The Python layer is based on the PyGTK and Gnome-Python libraries written by James Henstridge.
When you use Python you no longer need to care about references and stuff, so you can focus on making pretty programs instead.
#!/usr/bin/env python import pygtk pygtk.require('2.0') import gtk import diacanvas canvas = diacanvas.Canvas() box = diacanvas.CanvasBox() box.set(border_width=0.3, color=diacanvas.color(200, 100, 100, 128)) canvas.root.add(box) box.move(20, 20) window = gtk.Window() view = diacanvas.CanvasView(canvas=canvas) view.show() window.add(view) window.connect("destroy", gtk.mainquit) window.show() gtk.main()