(self)
| 343 | self.state = READY |
| 344 | |
| 345 | def startDemo(self): |
| 346 | self.refreshCanvas() |
| 347 | self.dirty = True |
| 348 | turtle.TurtleScreen._RUNNING = True |
| 349 | self.configGUI(DISABLED, NORMAL, DISABLED, |
| 350 | "demo running...", "black") |
| 351 | self.screen.clear() |
| 352 | self.screen.mode("standard") |
| 353 | self.state = RUNNING |
| 354 | |
| 355 | try: |
| 356 | result = self.module.main() |
| 357 | if result == "EVENTLOOP": |
| 358 | self.state = EVENTDRIVEN |
| 359 | else: |
| 360 | self.state = DONE |
| 361 | except turtle.Terminator: |
| 362 | if self.root is None: |
| 363 | return |
| 364 | self.state = DONE |
| 365 | result = "stopped!" |
| 366 | if self.state == DONE: |
| 367 | self.configGUI(NORMAL, DISABLED, NORMAL, |
| 368 | result) |
| 369 | elif self.state == EVENTDRIVEN: |
| 370 | self.exitflag = True |
| 371 | self.configGUI(DISABLED, NORMAL, DISABLED, |
| 372 | "use mouse/keys or STOP", "red") |
| 373 | |
| 374 | def clearCanvas(self): |
| 375 | self.refreshCanvas() |
nothing calls this directly
no test coverage detected