mirror of https://github.com/python/cpython
Merge with 3.4
This commit is contained in:
commit
dfb110d8a3
|
@ -260,12 +260,13 @@ class DemoWindow(object):
|
||||||
return menu
|
return menu
|
||||||
|
|
||||||
def refreshCanvas(self):
|
def refreshCanvas(self):
|
||||||
if not self.dirty: return
|
if self.dirty:
|
||||||
self.screen.clear()
|
self.screen.clear()
|
||||||
self.dirty=False
|
self.dirty=False
|
||||||
|
|
||||||
def loadfile(self, filename):
|
def loadfile(self, filename):
|
||||||
self.refreshCanvas()
|
self.clearCanvas()
|
||||||
|
turtle.TurtleScreen._RUNNING = False
|
||||||
modname = 'turtledemo.' + filename
|
modname = 'turtledemo.' + filename
|
||||||
__import__(modname)
|
__import__(modname)
|
||||||
self.module = sys.modules[modname]
|
self.module = sys.modules[modname]
|
||||||
|
@ -318,9 +319,7 @@ class DemoWindow(object):
|
||||||
self.exitflag = False
|
self.exitflag = False
|
||||||
self.configGUI(NORMAL, NORMAL, DISABLED, DISABLED,
|
self.configGUI(NORMAL, NORMAL, DISABLED, DISABLED,
|
||||||
"STOPPED!", "red")
|
"STOPPED!", "red")
|
||||||
turtle.TurtleScreen._RUNNING = False
|
turtle.TurtleScreen._RUNNING = False
|
||||||
else:
|
|
||||||
turtle.TurtleScreen._RUNNING = False
|
|
||||||
|
|
||||||
def _destroy(self):
|
def _destroy(self):
|
||||||
self.root.destroy()
|
self.root.destroy()
|
||||||
|
|
|
@ -219,7 +219,7 @@ def main():
|
||||||
mainscreen.mode("standard")
|
mainscreen.mode("standard")
|
||||||
mainscreen.setup(SCREENWIDTH, SCREENHEIGHT)
|
mainscreen.setup(SCREENWIDTH, SCREENHEIGHT)
|
||||||
nim = Nim(mainscreen)
|
nim = Nim(mainscreen)
|
||||||
return "EVENTLOOP!"
|
return "EVENTLOOP"
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue