Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88b2b45 commit b8352e7Copy full SHA for b8352e7
1 file changed
Lib/turtledemo/__main__.py
@@ -252,27 +252,11 @@ def stopIt(self):
252
253
def _destroy(self):
254
self.root.destroy()
255
- sys.exit()
256
257
258
-if __name__ == '__main__':
+def main():
259
demo = DemoWindow()
260
- RUN = True
261
- while RUN:
262
- try:
263
- #print("ENTERING mainloop")
264
- demo.root.mainloop()
265
- except AttributeError:
266
- #print("AttributeError!- WAIT A MOMENT!")
267
- time.sleep(0.3)
268
- print("GOING ON ..")
269
- demo.ckearCanvas()
270
- except TypeError:
271
- demo.screen._delete("all")
272
- #print("CRASH!!!- WAIT A MOMENT!")
273
274
- #print("GOING ON ..")
275
- demo.clearCanvas()
276
- except:
277
- print("BYE!")
278
- RUN = False
+ demo.root.mainloop()
+
+if __name__ == '__main__':
+ main()
0 commit comments