[pygtk] pygtk/c extension

Bernhard Lohkamp b.lohkamp at gmail.com
Wed Apr 4 21:53:49 WST 2007


Hi,

I try to wrap some c functions for python (pygtk) use and followed
pygtk FAQ and Ross Burtons instruction ('Wrap GObjects in Python'). So
I use:

pygobject_new((GObject*) widget);

to return a pygtk object. This works fine for not existing c widgets
and it creates a new pygtk widget. However for existing c widget it
returns None (in the worst case when the c fuctions includes a
lookup_widget call I get a segmentation fault). Any help is much
appreciated.

Cheers,

B


More information about the pygtk mailing list