Computer Science 217
On the Many Different Species of Turtle

John Aycock



Turtle on CPSC Machines

Python 3 on the CPSC machines has a turtle module available. If you want to see what's available in it, from the Python interpreter prompt:

import turtle
help(turtle)
In general, help works to find out information about any standard module.

With the turtle, you can change its window size by using turtle.setup, e.g., to set a width of 640 and a height of 480:

import turtle
turtle.setup(640, 480)

And, for big pictures, to speed up drawing with the turtle module:

turtle.tracer(1000)
(Thanks to a previous 217 student for pointing out the latter one!)

microPython Turtle

This is a (very) small subset of Python's turtle module.

General Turtle Hints



John Aycock 2012-01-13