Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Turtle turtle.Screen() not working
-
I am on my ipad and i just bought pythonista. I wanted to create something in turtle but i kept on getting the error: module ‘turtle’ has no attribute ‘Screen’
The code:import turtle as t playerAscore=0 playerBscore=0 window = t.Screen() window.title("pong ping") window.bgcolor("black") window.setup(width=800,height=600) window.tracer(0)
I am aware this turtle module is possibly old or unfinished but if there is anything i can do please let me know.a
-
Add
window.present()
-
Whereabouts should i add that?
-
At the end.
-
Same error happens
-
-
As a check:
import turtle print(turtle.__file__)
-
@cvp I’m new to this, what do you mean exactly?
-
-
Add those two lines to the top of the script. Copy the result and paste here.
a common problem is that you created a file called turtle.py where you intended to try out the turtle module. But when you type import turtle, it imports your file, not the actual turtle module.
-
@JonB sorry, didn't know you were there...
-
so how do we fix the file turtle.py problem
-