Re: [Tkinter-discuss] update of elements in GUI

2010-08-18 Thread Alex Ter-Sarkissov
Ok, it actually seems to work, apart from one thing: what if I need to update an array, rather than a single element? I mean, each iteration I store an array, then use it the next iteration (naturally, the first array is generated randomly). This worked for the counter: 1. def run(*args): 2

Re: [Tkinter-discuss] update of elements in GUI

2010-08-18 Thread Alex Ter-Sarkissov
thanks guys, this does seem to work...nevertheless, since I'm quite new to both python and gui design, one more question: how would I do the same, but launching the counter at the click of the button? I tried (from Firat's last example) def increment(*args):var.set(var.get()+1)root.after(1

Re: [Tkinter-discuss] update of elements in GUI

2010-08-18 Thread Firat Ozgul
[quote]Cameron Laird: "update() is *not* essential: after() provides a non-threading alternative."[/quote] I agree. If you would not like to use update(), you can use after() in your code with pretty much the same functionality: http://paste-it.net/public/e7ce371/ ___

Re: [Tkinter-discuss] update of elements in GUI

2010-08-18 Thread Cameron Laird
On Wed, Aug 18, 2010 at 08:19:38AM +0300, Firat Ozgul wrote: . . . > If I am not mistaken you want something like this: > > 1) http://paste-it.net/public/i2de44d/ (with threads and classes) > > 2) http://paste-it.net/public/f