开发者

Why ActivePython freezes after I use the turtle module?

I've installed ActivePython 3.1 and ran IDLE with -n parameter as required by the turtle module in documentation. However when I try to use it with call such as turtle.postion(), new windows is opened (with Tk icon), which fre开发者_Go百科ezes and shows nothing. What could be wrong?


The immediate cause of the freeze is that the Tk event loop is not being serviced. Without that, Tk windows do not display or update correctly (all GUI toolkits are event based, but Tk is particularly so). Unfortunately, I don't know Python's Tk binding or IDLE nearly well enough to be able to say what that is caused by.


Partially resolved by not running it in IDLE, I execute it as a python script and wait for input to see what is drawn.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜