[Edu-sig] How to explore Tkinter interactively with IDLE 1.0

Kirby Urner urnerk at qwest.net
Fri Sep 26 11:40:57 EDT 2003


> From: Gregor Lingl [mailto:glingl at aon.at]
> Example 1:
> 
> Start IDLE (Python 2.3.1, IDLE 1.0)
> 
>  >>> from turtle import *
>  >>> demo()
> 
> Now something very strange happens: three squares are drawn slowly and
> then,
> after approximately two seconds the program seems to stop during
> execution.


Over here, demo() executes OK, with 3 small boxes.  The 3rd box is filled in
(color filled).

I wonder if there's any chance your file associations are connecting you to
more than one version of Python.  Do your .py and .pyc files all point to
the latest install?  Do other Pythons exist on the same machine?

The Tk() mainloop() example is as you report it -- not sure if that's a bug
(it seems a window without any defined controls *would* be unresponsive --
there is no chance for the user to generate events, other than to terminate
the loop).

BTW, have you explored GUI event programming with wxPython instead of Tk?
There's a lot more functionality in wx -- just running the wxPython demo
will probably convince you of that.

But that doesn't mean you can't/shouldn't use *both* (plus there's the
win32all approach).

Kirby





More information about the Edu-sig mailing list