gtk.main_iteration is documented as returning True when a gtk_main_quit is
called.  In addition, if block is set to True, the system is supposed to
wait until it gets an event before continuing.

However, in the included program, main_iteration() always seems to return
True and the loop prints "Loop called" about once every .1 seconds.

Is this correct behavior?

My system is: Mac OS X 10.3.3 - pygtk 2.2.0 - Python 2.3.2

Thanks,
-a

--- < cut here > ---
#!/usr/bin/env python

import gtk
import time

window = gtk.Window()
window.show_all()

window.connect('destroy', gtk.mainquit)
window.connect('delete_event', gtk.mainquit)

loopActive = True
while loopActive:
    loopActive = gtk.main_iteration(block=True)

    print "Loop called:", loopActive, time.time()

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to