thnx a lot, Firat, I sorted it out a few minutes b4 reading yr post)
i just needed 2 loops: one for the counter (while j
> I am not sure whether my understanding of your problem is correct, but if I
> am not wrong you want something like this:
>
> http://paste-it.net/public/i866d84/
>
>
>
> 2010/
I am not sure whether my understanding of your problem is correct, but if I
am not wrong you want something like this:
http://paste-it.net/public/i866d84/
2010/8/19 Alex Ter-Sarkissov
> Ok, it actually seems to work, apart from one thing: what if I need to
> update an array, rather than a sing
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
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
[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/
___
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
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/f5e340e/ (without threads and classes)
Note that without threads, we need to use the update() method. However,
without threads you will experience so
thanks, in one of these articles it says. 'Be careful - Tkinter in not
re-entrant'. MAybe this is the problem? So far I've tried
(1)
Label(mainframe.update_idletasks(),textvariable=best,bg='#321000',fg='#000fff000',font=("Helvetica",x1)).grid(column=1,row=1)
and
(2)
mainframe = Frame(root)
main
On Wed, Aug 18, 2010 at 12:50:38AM +1200, Alex Ter-Sarkissov wrote:
.
.
.
> I have some elements on the screen (Labels, most importantly) which content
> has to be updated every iteration of the algorithm run, e.g. "Iteration =
I have some elements on the screen (Labels, most importantly) which content
has to be updated every iteration of the algorithm run, e.g. "Iteration ="
[i] for i in range(n). I've tried using mainframe.update_idletasks()
and Label(mainframe.update_ideltasks(),textvariable=var).grid(column=1,row=1),
10 matches
Mail list logo