[Tutor] Tkinter idiosyncracies?

Lie Ryan lie.1296 at gmail.com
Sat Jun 20 00:12:17 CEST 2009


Wayne wrote:
> I'd expect that upon clicking the button the text of the label would
> change to 'Foo', then it would wait for 4 seconds, and then the text
> would change to 'Bar'. It doesn't do this - instead, it waits for 4
> seconds, and then the text changes to foo, then bar, almost too fast to
> see. A similar thing happens (or the exact same) if you replace funky
> with this definition:

after and sleep is a blocking operation. That means after you called
them, the program execution does not have the chance to return to the
main loop and tk does not have the chance to update the screen.



More information about the Tutor mailing list