This is my first pygtk program and I know I am missing something simple but can't find what is the right way to do this:
I have three open sockets added by io_add_watch. When I have
while gtk.events_pending():
gtk.main_iteration()
at the end of my IO callbacks some IO events got missed or happen far later then they should. If I put just
if gtk.events_pending():
gtk.main_iteration()
it works better but still no stable results. In pygtk faq I found "Note that running a mainiteration inside an idle, io (input_add) or timeout handler is generally considered `a bad idea' because it doesn't work very well." So what is the right way to do it? Do I have to use threads?
I use pygtk-2.6.10
Thank you, Genie
_______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/