mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Merge with 3.4
This commit is contained in:
commit
c1d609e8c8
1 changed files with 5 additions and 21 deletions
|
@ -318,27 +318,11 @@ class DemoWindow(object):
|
||||||
|
|
||||||
def _destroy(self):
|
def _destroy(self):
|
||||||
self.root.destroy()
|
self.root.destroy()
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
demo = DemoWindow()
|
||||||
|
demo.root.mainloop()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
demo = DemoWindow()
|
main()
|
||||||
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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue