Delete all drawings and all turtles from the TurtleScreen. No argument. Reset empty TurtleScreen to its initial state: white background, no backgroundimage, no eventbindings and tracing on. Example (for a TurtleScreen instance named screen): >>> screen.clea
(self)
| 901 | rootwindow.call('wm', 'attributes', '.', '-topmost', '0') |
| 902 | |
| 903 | def clear(self): |
| 904 | """Delete all drawings and all turtles from the TurtleScreen. |
| 905 | |
| 906 | No argument. |
| 907 | |
| 908 | Reset empty TurtleScreen to its initial state: white background, |
| 909 | no backgroundimage, no eventbindings and tracing on. |
| 910 | |
| 911 | Example (for a TurtleScreen instance named screen): |
| 912 | >>> screen.clear() |
| 913 | |
| 914 | Note: this method is not available as function. |
| 915 | """ |
| 916 | self._delayvalue = _CFG["delay"] |
| 917 | self._colormode = _CFG["colormode"] |
| 918 | self._delete("all") |
| 919 | self._bgpic = self._createimage("") |
| 920 | self._bgpicname = "nopic" |
| 921 | self._tracing = 1 |
| 922 | self._updatecounter = 0 |
| 923 | self._turtles = [] |
| 924 | self.bgcolor("white") |
| 925 | for btn in 1, 2, 3: |
| 926 | self.onclick(None, btn) |
| 927 | self.onkeypress(None) |
| 928 | for key in self._keys[:]: |
| 929 | self.onkey(None, key) |
| 930 | self.onkeypress(None, key) |
| 931 | Turtle._pen = None |
| 932 | |
| 933 | def mode(self, mode=None): |
| 934 | """Set turtle-mode ('standard', 'logo' or 'world') and perform reset. |
no test coverage detected