summaryrefslogtreecommitdiffstats
path: root/Lib/turtledemo/minimal_hanoi.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/turtledemo/minimal_hanoi.py')
-rwxr-xr-xLib/turtledemo/minimal_hanoi.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/turtledemo/minimal_hanoi.py b/Lib/turtledemo/minimal_hanoi.py
index cfb78dc..4a432f2 100755
--- a/Lib/turtledemo/minimal_hanoi.py
+++ b/Lib/turtledemo/minimal_hanoi.py
@@ -50,9 +50,12 @@ def hanoi(n, from_, with_, to_):
def play():
onkey(None,"space")
clear()
- hanoi(6, t1, t2, t3)
- write("press STOP button to exit",
- align="center", font=("Courier", 16, "bold"))
+ try:
+ hanoi(6, t1, t2, t3)
+ write("press STOP button to exit",
+ align="center", font=("Courier", 16, "bold"))
+ except Terminator:
+ pass # turtledemo user pressed STOP
def main():
global t1, t2, t3