[issue11075] Turtle crash with IDLE on Mac OS X 10.6

Alex McNerney report at bugs.python.org
Tue Feb 1 03:07:06 CET 2011


Alex McNerney <amcnerney13 at yahoo.com> added the comment:

It may be because the program that I am trying to run automatically exits, I do not know yet how to keep a turtle program running (waiting for input). The only way I know so far is to use the function "exitonclick()," but when using that, my I cannot use any other mouseevents in my program. (Help?) Anyways, an example of a script that will cause turtle to hang/crash is even such a simple one as:
"
import turtle as t
def flfr():
    t.fd(10)
    t.lt(45)
    t.fd(10)
    t.rt(45)
t.onkey(flfr, "Up")
t.listen()
"
Is there anyway to keep a turtle program running, waiting for user interaction without using the exitonclick() function? Also, thank you for pointing out the maintenance svn, I did an svn checkout, compiled, and installed it and it fixed other problems that I was having with Python 2.7.1 ActiveState Tcl/Tk 8.5.9 (such as hanging when running a program when the shell isn't open.)

Another quick question that you don't have to answer: is there anyway to ignore interaction (keystrokes, mouseclicks) while an onkey function is activated? Like if I make a function that takes 10 seconds to complete, can I ignore all interaction while that function is being run?

Thank you for your time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11075>
_______________________________________


More information about the Python-bugs-list mailing list