[pygtk] Refresh window

Genie Fomina fgenie at gmail.com
Thu Dec 1 00:31:27 WST 2005


Hello All,

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20051130/6dc6ad3b/attachment-0001.htm


More information about the pygtk mailing list