On Wed, 2005-11-30 at 11:31 -0500, Genie Fomina wrote: > 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?
See [1] and [2] ([2] now ships in Kiwi2). [1] http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq23.020.htp [2] http://www.gnome.org/~gjc/gtasklet/html/ Regards. -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
