Commit cbe6d243 authored by Terry Jan Reedy's avatar Terry Jan Reedy

Issue #22053: Cleanup turtledemo start and stop and fix debug shutdown warning.

parent f2eb721d
...@@ -282,20 +282,11 @@ class DemoWindow(object): ...@@ -282,20 +282,11 @@ class DemoWindow(object):
def _destroy(self): def _destroy(self):
self.root.destroy() self.root.destroy()
sys.exit() #sys.exit()
if __name__ == '__main__': def main():
demo = DemoWindow() demo = DemoWindow()
RUN = True
while RUN:
try:
print "ENTERING mainloop"
demo.root.mainloop() demo.root.mainloop()
except AttributeError:
print "CRASH!!!- WAIT A MOMENT!" if __name__ == '__main__':
time.sleep(0.3) main()
print "GOING ON .."
demo.refreshCanvas()
## time.sleep(1)
except:
RUN = FALSE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment