Figure 1: 4bugs
Figure 2: 3turtles
Figure 3: bytedesign
Figure 4: pentest
Figure 5: Manipulating the turtle from the shell
turtle provides a fairly complete turtle library, numerous sample turtle
scripts (in the scripts directory). The shell can be used to move the
turtle(s) around interactively.
For example, the simple example below shows controlling the turtle from
>>> for i in range(5):
See the turtle docs directory for more information.
All of the samples will draw dramatically faster if Auto Refresh is unchecked in the
Commands menu. If you have a fast machine and especially if you have a fast video card
such as a nVidia GeForce2 or better, then a lot of the turtle samples will draw
reasonably fast, except where points are plotted; the full window blit after each
drawing operation will make even those sample scripts slow. If you have on-board video
or a slow machine you will definitely want to uncheck Auto Refresh! This applies to
Mac OS X as well which seems quite slow if Auto Refresh is checked.
I have not updated the comments in the scripts for almost a year, so many of the
comments could apply to older versions of the turtle drawing routines and should be
taken with a grain of salt. If there is demand, I'll revisit the drawing support in
PythonCard and refactor and speed up operations where possible. See the hopalong
sample (not the turtle version of hopalong) if you are interested in plotting data. It
is much faster.