I'm looking for something similar to wx.Yield() in wxPython.

I've looked around a bit, and have come up with this function:

def finish():
    """
        Waits for current pending gtk events to finish
    """
   
    while gtk.gdk.events_pending():
        gtk.main_iteration()

but it doesn't work.  If I try to set the text of a label while in a loop that takes a long time, this function doesn't do anything.  The text in the label only ends up changing after the entire loop is done.

What am I doing wrong?

Adam
_______________________________________________
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/

Reply via email to