[Python-checkins] cpython (2.7): Issue #22053: Cleanup turtledemo start and stop and fix debug shutdown warning.
terry.reedy
python-checkins at python.org
Wed Jul 23 23:28:40 CEST 2014
http://hg.python.org/cpython/rev/823f5507bd86
changeset: 91804:823f5507bd86
branch: 2.7
parent: 91800:49a2bed5185a
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Wed Jul 23 17:27:51 2014 -0400
summary:
Issue #22053: Cleanup turtledemo start and stop and fix debug shutdown warning.
files:
Demo/turtle/turtleDemo.py | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/Demo/turtle/turtleDemo.py b/Demo/turtle/turtleDemo.py
--- a/Demo/turtle/turtleDemo.py
+++ b/Demo/turtle/turtleDemo.py
@@ -282,20 +282,11 @@
def _destroy(self):
self.root.destroy()
- sys.exit()
+ #sys.exit()
+
+def main():
+ demo = DemoWindow()
+ demo.root.mainloop()
if __name__ == '__main__':
- demo = DemoWindow()
- RUN = True
- while RUN:
- try:
- print "ENTERING mainloop"
- demo.root.mainloop()
- except AttributeError:
- print "CRASH!!!- WAIT A MOMENT!"
- time.sleep(0.3)
- print "GOING ON .."
- demo.refreshCanvas()
-## time.sleep(1)
- except:
- RUN = FALSE
+ main()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list