[Edu-sig] Anyone interested in discussing the turtle module?

Vern Ceder vceder at gmail.com
Thu Jun 2 00:41:06 CEST 2011


On Wed, Jun 1, 2011 at 4:37 PM, Gregor Lingl <gregor.lingl at aon.at> wrote:

> Hi Jeff,
>
> I think Corey's solution is the canonical one and quite ok.
>
> Just a few remarks concerning the your problem and the turtle module.
>
> 1. The present solution for the turtle.Screen() window was introduced by
> Vern Ceder for the previous module (as far as I rembmber) and had to be
> retained for upward compatibility reasons.
>

Indeed, I added that as a hack to give some ability to change screen size on
startup.


> 2. I'm also finding the inability of turtle.Screen() to take screen size
> arguments
> a deficiency. So you could propose your idea to the python issue tracker
> (or if  you prefer I could do this also). This will be relevant for Python
> 3.3 only
> but I'm definitely interested to implement additions and amendments like
> this.
> (According to the Python 3.3 release schedule, this must be done until
> June. 23rd 2012 (!). This should be no problem.)
>

I personally don't think that using turtle.Screen() is the way to go with
the new version of the turtle library, but it is handy to have it for older
examples.


> 3. There is (at least) one more way to adjust the initial screensize,
> namely by
> putting an appropriate entry into a turtle.cfg file. You can customize some
> more properties with this file). See
>
> 22.1.6.3  How to configure Screen and Turtles in the Python-Docs:
>
>
> http://docs.python.org/library/turtle.html#how-to-configure-screen-and-turtles
>
> I used this for my book "Python für Kids" where I wanted a consistent
> appearance of the turtle window.
>

This is what I used in our "TurtleLab" project that I showed some of you at
the 2010 PyCon... for the source of an earlier version, see
https://bitbucket.org/vceder/turtlelab/wiki/Home . I'm not actively
maintaining it, but my assistant Simon Ruiz has worked on it quite a bit, if
there's interest I'll get his latest version merged into the repository.

In general we've found the current turtle  library to be pretty flexible and
robust.

Cheers,
Vern


> 4. There are essentially only two classes to be used from the turtle
> Module.
>
> So if you want to work object-based, it is possible to do this by
>
> from turtle import Screen, Turtle
>
> I found this to be a bit less verbose and also useful in order to avoid
> confusion of
> module turtle and class Turtle. (I think to some degree this is a matter of
> taste)
>
> 5. Probably you will stumble about some other weird features of the module
> or
> have some bright ideas for amendments or you will have some more questions
> converning turtle.py. I'm definitely wanting to discuss these with you and
> others.
> Perhaps we could arrive at a still better turtle module for Python 3.3.
> (But please keep in mind the compatibility requirements for modules in the
> standard library).
>
> Best regards
>
> Gregor Lingl
>
> Am 31.05.2011 22:59, schrieb Jeff Elkner:
>
>  Hi All,
>>
>> I'm working on an introductory CS book using Python with the turtle
>> module, but I'm finding the inability of turtle.Screen() to take
>> screen size arguments to be a real pain.  The screen size appears to
>> depend on the screen size of the host environment, which means
>> standardizing screen shots for the book becomes impossible.
>>
>> Any thoughts on this issue?  It would be a huge help in promoting
>> Python's use in education if we could make use of such a potentially
>> fine module as the turtle module, but I'm finding it very difficult to
>> write curriculum materials that use it since students don't have
>> control over the turtle's screen in any easy to use way.
>>
>> Thanks!
>>
>> jeff elkner
>> open book project
>> http://openbookproject.net
>> _______________________________________________
>> Edu-sig mailing list
>> Edu-sig at python.org
>> http://mail.python.org/mailman/listinfo/edu-sig
>>
>>  _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>



-- 
Vern Ceder
vceder at gmail.com, vceder at dogsinmotion.com
The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20110601/30932953/attachment-0001.html>


More information about the Edu-sig mailing list