On Thu, Jun 18, 2009 at 03:34:38PM -0500, Adam Kadzban wrote:
.
.
.
> Hi again, let me start off by saying that my code does what I want it to,
> it's just done in a terribly hackish way, and I'm wondering if there's a
> better way to do it.
>
.
.
.
> ...
> loop = 1
> ...
> (create a button that sets loop to 0)
> ...
> top.update()
> ...
> while loop:
> top.update()
> ...do stuff...
> top.update()
>
> This works, but I feel like there's got to be a better way to be doing
> this. I can get rid of the first top.update(), and one of the updates in
> the loop, but this configuration seems to be the most responsive. And using
> update_idletasks() doesn't seem to work, at all.
>
> Anyone have an idea?
.
.
.
A. A lot of people through the years have used update().
If you have something already working as you want ...
well, there's *considerable* value in that.
B. The idiomatic way to do such things in Tkinter is with
after() <URL: http://wiki.tcl.tk/1526 >.
C. Many programmers also use Python threads to achieve
the effect you describe. I don't have an example at
hand just now.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss