Sep-29-2020, 11:42 PM
EDIT: a workaround is: restart the shell each time, somehow the window killer remains in memory. Any way to reset this without restarting the shell??
When I installed Python in Win 10 for the gf, I saw she had examples of turtle. A nice clock, for example. I did not know about turtle.
So I am looking at it, here in tutorialspoint.com. Thought it might be fun to show some kids.
I import turtle in the Idle shell:
Does anyone know what is wrong?
When I installed Python in Win 10 for the gf, I saw she had examples of turtle. A nice clock, for example. I did not know about turtle.
So I am looking at it, here in tutorialspoint.com. Thought it might be fun to show some kids.
I import turtle in the Idle shell:
import turtle from turtle import *But I immediately get an error from this simple example to draw a square (and other simple examples):
def myApp(): my_pen = turtle.Turtle() for i in range(4): my_pen.forward(50) my_pen.right(90) turtle.done()The error in Idle is:
Quote:>>> myApp()
Traceback (most recent call last):
File "<pyshell#34>", line 1, in <module>
myApp()
File "<pyshell#33>", line 2, in myApp
my_pen = turtle.Turtle()
File "/usr/lib/python3.6/turtle.py", line 3816, in __init__
visible=visible)
File "/usr/lib/python3.6/turtle.py", line 2557, in __init__
self._update()
File "/usr/lib/python3.6/turtle.py", line 2660, in _update
self._update_data()
File "/usr/lib/python3.6/turtle.py", line 2646, in _update_data
self.screen._incrementudc()
File "/usr/lib/python3.6/turtle.py", line 1292, in _incrementudc
raise Terminator
turtle.Terminator
Does anyone know what is wrong?