[pygtk] Make Dialog disappear without returning to main loop

Florian Diesch diesch at spamfence.net
Sun Mar 21 04:07:29 WST 2010


Nikolaus Rath <Nikolaus at rath.org> writes:

> I am creating a dialog in a callback function. Is there a way to make
> the dialog window disappear before the callback function returns?
>
> I do not care if the main window keeps unresponsive, I just want the
> dialog to disappear.
>
> Here is a small sample script to demonstrate what I mean:
>
>
> I would like to have the dialog window disappear *before* the
> time.sleep() in do_stuff() finishes. Is that possible?

Call

  while gtk.events_pending():
      gtk.main_iteration ()

so that pending events are processed.


   Florian
-- 
GUIs programmieren mit Python und Glade:
<http://www.florian-diesch.de/doc/python-und-glade/>


More information about the pygtk mailing list