This code:
while gtk.events_pending():
gtk.main_iteration()
is really handy in GTK apps -- eg. it seems to be essential to run this
loop if you change to the "busy" cursor immediately before starting some
GUI-blocking operation.
But it appears to be pure evil when called from code that is added to
the event queue with gobject.idle_add() from another thread:
specifically, my entire application locks up hard, and all I can do is
kill it.
(Sometimes I'm lazy and block the GUI with "short" operations, and
sometimes I do the right thing and spawn a thread.)
Oh, this is with GTK 2.4.14, PyGTK 2.4.1, Python 2.3.4, all running
under Linux 2.6.10 on Debian unstable. (FWIW, I observed the same
behaviour a few weeks ago with Linux 2.4.27.)
Is this just an unavoidable interaction between GTK and Python? Or
should I be coding my "consume events" loop in some other way so that it
will work from idle_add()'ed code?
Thanks --
Greg
--
Greg Ward <[EMAIL PROTECTED]> http://www.gerg.ca/
This email message may have come into contact with peanuts.
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/