bristop
Posts: 1
Joined: Thu May 22, 2014 6:30 pm

Turtle Graphics in Python 3.2.2

Thu May 22, 2014 6:39 pm

I’m trying to get Turtle graphics working in Python on the Pi. Python is v 3.2.3, with TK 8.5. When I run a program with import Turtle I get an error: ImportError: cannot import name TurtleScreen. I’ve Googled around without success, any ideas?, I’m probably missing the obvious!

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Turtle Graphics in Python 3.2.2

Thu May 22, 2014 8:16 pm

Code: Select all

import turtle
This is from an idle3 session using Raspbian -

Code: Select all

Python 3.2.3 (default, Mar  1 2013, 11:53:50) 
[GCC 4.6.3] on linux2
Type "copyright", "credits" or "license()" for more information.
>>> import turtle
>>> turtle.position()
(0.00,0.00)
>>> 
>>> turtle.forward(25)
>>> turtle.position()
(25.00,0.00)
>>> turtle.forward(-75)
>>> turtle.position()
(-50.00,0.00)
>>> 
https://docs.python.org/3.0/library/turtle.html
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Return to “Graphics programming”