[Python-checkins] cpython (merge 3.4 -> default): Merge with 3.4
terry.reedy
python-checkins at python.org
Wed Jul 23 23:28:42 CEST 2014
http://hg.python.org/cpython/rev/f1faeca3971f
changeset: 91806:f1faeca3971f
parent: 91803:9dc66b3a1d0d
parent: 91805:57531d65cdd4
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Wed Jul 23 17:28:15 2014 -0400
summary:
Merge with 3.4
files:
Lib/turtledemo/__main__.py | 26 +++++---------------------
1 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/Lib/turtledemo/__main__.py b/Lib/turtledemo/__main__.py
--- a/Lib/turtledemo/__main__.py
+++ b/Lib/turtledemo/__main__.py
@@ -318,27 +318,11 @@
def _destroy(self):
self.root.destroy()
- 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("AttributeError!- WAIT A MOMENT!")
- time.sleep(0.3)
- print("GOING ON ..")
- demo.ckearCanvas()
- except TypeError:
- demo.screen._delete("all")
- #print("CRASH!!!- WAIT A MOMENT!")
- time.sleep(0.3)
- #print("GOING ON ..")
- demo.clearCanvas()
- except:
- print("BYE!")
- RUN = False
+ main()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list