[pygtk] Extract GtkObject from PyObject

Jeremy Lewi jlewi at intellisis.com
Sat May 23 05:32:03 WST 2009


Hi,
	I'm trying to embed python in my c-application so that I can use
matplotlib. My python code sets up a GtkObject to sends signals.  I want
to pass a reference to this GtkObject back to my C-Code so that I can
then send signals from C. I can use SWIG to create C functions that are
callable from python. In this case I pass a Python GtkObject
(PyGtkObject) into my C-function. From this PyObject I need to extract a
GtkObject so that I can use it with the gtk functions in C. 
	Can anyone help me do this? I assume PyGtk does this in order to
interface with the C language bindings for gtk.


Thanks
Jeremy



More information about the pygtk mailing list