I have a Gtk.Window
object in Python. This object is essentially little more than a wrapper around a GtkWindow *
. Is it possible, from C (with a PyObject *
) or Python, to get at that GtkWindow *
?
I have an app, written in Python, but some of the rendering code for a particular widget is just too slow. I attempted to isolate it in an alternate thread, but I think I'm getting bit by the GIL, because I'm attempting to have two threads do CPU work. (The background thread, with is nearly 100% CPU, is fighting too much time away from the UI thread when it needs it, causing it to be unresponsive.) It'd be simple enough to write the background worker in C, if I had the pointer.
If you have a PyGObject it should go like this:
(Taken from http://www.daa.com.au/pipermail/pygtk/2003-November/006292.html) Only I do not know how to convert a PyObject to PyGObject.