Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Lib/turtle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,11 @@ def __init__(self, cv, mode=_CFG["mode"],
rootwindow = cv.winfo_toplevel()
rootwindow.call('wm', 'attributes', '.', '-topmost', '1')
rootwindow.call('wm', 'attributes', '.', '-topmost', '0')
# The class variable _RUNNING being persistent after this module is imported, this should be made True when the next object is created.
# This is particularly needed for running in notebooks or GUI application but does not affect the usual self-contained single instance execution
# nor any of the turtle-demos

TurtleScreen._RUNNING = True

def clear(self):
"""Delete all drawings and all turtles from the TurtleScreen.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Turtle based code used to raise terminator exception (usually on every second run) in applications such as Jupyter/Spyder notebooks. Update to fix this error.