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

Jeff Elkner jeff at elkner.net
Tue May 31 23:30:15 CEST 2011


I had tried that, but I was concerned that it returned a None, so I
thought there was no way to refer to the screen after using it.
Trying it again, it seems:

import turtle

turtle.setup(800, 600)
wn = turtle.Screen()

alex = turtle.Turtle()
alex.forward(200)

wn.exitonclick()

works just fine.

Thanks, Corey!

jeff elkner
open book project
http://openbookproject.net

On Tue, May 31, 2011 at 5:05 PM, Corey Richardson <kb1pkl at aim.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 05/31/2011 04:59 PM, Jeff Elkner wrote:
>> 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!
>>
>
> I believe you want turtle.setup,
> http://docs.python.org/library/turtle.html#turtle.setup
>
> - --
> Corey Richardson
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (GNU/Linux)
>
> iQEcBAEBAgAGBQJN5Vf+AAoJEAFAbo/KNFvp6KwH/1MPtZirFpQuUKJvNFIFl7y1
> /8b6txcu23RnGSdwcOwL/lhsLqgA5moNotPEn67ifYSTXKJuxsLvCqbmpin0q4Yi
> ea9Zw3yNwDb5DCm9jofVZHbSE7h/4v2a6aIUzg4RrMzTiie2KmNuoTpKNYYSu+Wo
> 2HxXqJQBFV1d8UJE4tTbQ/1jUOjAi3IZgq7F79Z1lyFwuuvD+0pPwInFnn0iZqo4
> Gl68ndOuB96ZnEtgCtaSdbaP3oPXHWHis/JI2AgtULHkni0ZJXId/DCRtX0S+k7z
> FyMLw7HTPe1GIxOuOW2/ObWMDP1AvMFzbdIES5SVaeHyBFC3/tg4tGEskoP1Ym4=
> =QBCe
> -----END PGP SIGNATURE-----
>


More information about the Edu-sig mailing list