return menu
def refreshCanvas(self):
- if not self.dirty: return
- self.screen.clear()
- self.dirty=False
+ if self.dirty:
+ self.screen.clear()
+ self.dirty=False
def loadfile(self, filename):
- self.refreshCanvas()
+ self.clearCanvas()
+ turtle.TurtleScreen._RUNNING = False
modname = 'turtledemo.' + filename
__import__(modname)
self.module = sys.modules[modname]
self.exitflag = False
self.configGUI(NORMAL, NORMAL, DISABLED, DISABLED,
"STOPPED!", "red")
- turtle.TurtleScreen._RUNNING = False
- else:
- turtle.TurtleScreen._RUNNING = False
+ turtle.TurtleScreen._RUNNING = False
def _destroy(self):
self.root.destroy()
mainscreen.mode("standard")
mainscreen.setup(SCREENWIDTH, SCREENHEIGHT)
nim = Nim(mainscreen)
- return "EVENTLOOP!"
+ return "EVENTLOOP"
if __name__ == "__main__":
main()