diff options
Diffstat (limited to 'Lib/turtledemo/minimal_hanoi.py')
-rwxr-xr-x | Lib/turtledemo/minimal_hanoi.py | 9 |
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 |