time.sleep() and Tkinter after()?

Hendrik van Rooyen mail at microcorp.co.za
Thu Dec 4 23:27:12 EST 2008


 "Davy" <zhli... at gmail.com> wrote:

>Although I don't understand your explanation very well(I guess
>maybe .after() re-schedule is better than .sleep unresponsive in GUI
>application?)I will take it as a golden rule.

I did not in fact try to explain it - I was trying to get you to
think a bit wider, as that way you would get more benefit
than just being given a solution.

As for taking what I say as a golden rule:-

If you hang around this group for long enough, you will learn to
never take what I say as gospel - I often pull the piss - be warned!

8<-----------------------------------

>Yeah, I forgot to *delete* the rectangle object I generate before.
>One more question, besides create/delete method, can I just create two
>rectangles (one black/one white), and assign two tags to these two
>rectangles, and place rectangle by just using tags(that is, can I
>place one object on several places of the canvas)?

You can redraw it to make it look different and position it on
another place, but I have never seen one thing in two places
before. If it is possible I don't know how to do it.

Now if it were a class, you could have multiple instances,
but I have only ever seen one thing, one picture...

- Hendrik






More information about the Python-list mailing list