[Python-Dev] xturtle.py a replacement for turtle.py(!?)

Gregor Lingl glingl at aon.at
Wed Jun 28 12:57:23 CEST 2006


xturtle.py, extended turtle graphics
a new Tkinter based turtle graphics module for Python

I just have released xturtle.py (v.0.91).  It can be found at:

http://sourceforge.net/tracker/?group_id=5470&atid=305470

with RequestID 1513695 (and 1513699 for the docs)
and also here

http://ada.rg16.asn-wien.ac.at/~python/xturtle

with some supplementary information.

xturtle was first announced at the edu-sig and is reported 
to work properly on all major platforms (Mac, Linux and 
Windows)

Now I was suggested to discuss it on this list. So I'll try.

For now I'll give only two indroductory statements and wait 
for a response, hoping that a fruitful discussion will evolve.

(I) The module xturtle.py is an extended reeimplementation 
of turtle.py, retains its merits and is backward compatible 
to turtle.py. Enhancements over turtle.py are:

# Better animation of the turtle movements, especially of 
turning the turtle. So the turtles can more easily be used 
as a visual feedback instrument by the (beginning) programmer.
# Different turtle shapes, gif-images as turtle shapes, user 
defined and user controllable turtle shapes, among them 
compound (multicolored) shapes.
# Fine control over turtle movement and screen updates via 
delay(), and enhanced tracer() and speed(), update() methods.
# Aliases for the most commonly used commands, like fd for 
forward etc., following the early Logo traditions. This 
reduces the boring work of typing long sequences of 
commands, which often occur in a natural way when kids try 
to program fancy pictures on their first encounter with 
turtle graphcis (still not knowing nothing about loops).
# Some simple commands/methods for creating event driven 
programs (mouse-, key-, timer-events). Especially useful for 
programming simple games.
# A scrollable Canvas class. The scrollable Canvas can be 
extended interactively as needed while playing around with 
the turtle(s) (e. g. to follow some escaped turtle). The 
Window containing the default canvas when using the Pen - 
class also can be resized and repositioned programmatically.
# Commands for controlling background color or background 
image.


(II) Motives: I designed this module to provide utmost easy 
access to a sufficiently rich graphics toolkit. I consider 
this crucial as well for students as for teachers, who e. g.
have to decide which programming language to use for 
teaching programming. Considering turtle graphics as a very
appropriate tool for introductory programming courses I used
the current turtle.py as a central tool in my book "Python 
for kids" despite beeing well aware of its deficiencies.
Now I propose a better one.

You may unterstand by intentions best by having a look at 
the 25+ example scripts (with the included demoViewer) 
provided in the xturtle.zip file, which can be downloaded
from the above mentioned website. (I think these demos 
should not be included in the standard distribution, they 
could go into a special edu-distro as Kirby Urner suggested 
lately.)

I would very much appreciate if xturtle.py could go into 
Python 2.5

Let's see

Gregor



More information about the Python-Dev mailing list