Tkinter and event loops

Toure Bomoko toure_bomoko at yahoo.co.uk
Fri Nov 22 17:38:53 EST 2002


I'm writing an application with a Tkinter GUI front end, the latter to
display output on a Canvas widget. The application should perform some
intensive computation whilst periodically updating the GUI, and I was
wondering if there was a way for the backend to regularly (and
manually) "yield" to the GUI so that it can process any pending events
before returning to the meaty processing for a bit, AND without using
threads. I've done this using C and the GTK+ widget library along
these lines:

    while (gtk_events_pending())
        gtk_main_iteration();

Toure



More information about the Python-list mailing list