Anyone interested in discussing the turtle module?
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
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. 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.) 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-turtl... I used this for my book "Python für Kids" where I wanted a consistent appearance of the turtle window. 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@python.org http://mail.python.org/mailman/listinfo/edu-sig
On Wed, Jun 1, 2011 at 4:37 PM, Gregor Lingl <gregor.lingl@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-turtl...
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@python.org http://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________
Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- Vern Ceder vceder@gmail.com, vceder@dogsinmotion.com The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW
On Tue, May 31, 2011 at 16:59, Jeff Elkner <jeff@elkner.net> wrote:
Hi All,
I'm working on an introductory CS book using Python with the turtle module,
Under what license? Can we talk about using Turtle Art in Sugar as a starting point? it can call Python functions assigned to blocks, providing an easy transition from pure TA to pure Python. We have support for various other CS topics on TA blocks, including stack operations. I am planning to write a Turing machine in TA, using colored dots as cells on the tape and instructions in the transition table.
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@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin Silent Thunder is my name, and Children are my nation. The Cosmos is my dwelling place, the Truth my destination. http://wiki.sugarlabs.org/go/Replacing_Textbooks
Hi Edward, The book is licensed under the GNU/FDL and is available here: http://www.openbookproject.net/thinkcs I'm very familiar with Turtle Art, since a college intern working with me last Summer did a Sugar to Gnome port of it, which in now in the debian repositories: http://packages.debian.org/search?keywords=turtleart This Summer we will work to get that into Fedora. While as a classroom teacher I'm a huge fan of turtle art, Python's own turtle module is the tool of choice for my current intro college leve textbook project, since it runs on all major platforms and is part of the Python standard library. Thanks! jeff elkner open book project http://openbookproject.net On Wed, Jun 1, 2011 at 6:37 PM, Edward Cherlin <echerlin@gmail.com> wrote:
On Tue, May 31, 2011 at 16:59, Jeff Elkner <jeff@elkner.net> wrote:
Hi All,
I'm working on an introductory CS book using Python with the turtle module,
Under what license?
Can we talk about using Turtle Art in Sugar as a starting point? it can call Python functions assigned to blocks, providing an easy transition from pure TA to pure Python. We have support for various other CS topics on TA blocks, including stack operations. I am planning to write a Turing machine in TA, using colored dots as cells on the tape and instructions in the transition table.
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@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin Silent Thunder is my name, and Children are my nation. The Cosmos is my dwelling place, the Truth my destination. http://wiki.sugarlabs.org/go/Replacing_Textbooks
On Thu, Jun 2, 2011 at 08:05, Jeff Elkner <jeff@elkner.net> wrote:
Hi Edward,
The book is licensed under the GNU/FDL and is available here:
Excellent. Thank you.
I'm very familiar with Turtle Art, since a college intern working with me last Summer did a Sugar to Gnome port of it, which in now in the debian repositories:
http://packages.debian.org/search?keywords=turtleart
This Summer we will work to get that into Fedora.
I should talk to someone about getting it into Ubuntu, to add to Logo, kturtleart, and the turtle art module in Etoys. ^_^
While as a classroom teacher I'm a huge fan of turtle art, Python's own turtle module is the tool of choice for my current intro college leve textbook project, since it runs on all major platforms and is part of the Python standard library.
I am planning a multi-year grade school sequence to introduce CS ideas using TA, with a transition from TA to Python by way of Python blocks in TA. I will take a look at your work, and see whether it makes sense to treat it as a followup to mine, or rather to design mine to lead into yours. Among the topics I intend to emphasize are Church's Thesis, Gödel recursive functions, parse trees, stack programming (and hence RPN), language interpretation, and building a Turing Machine in pure TA.
Thanks!
jeff elkner open book project http://openbookproject.net
On Wed, Jun 1, 2011 at 6:37 PM, Edward Cherlin <echerlin@gmail.com> wrote:
On Tue, May 31, 2011 at 16:59, Jeff Elkner <jeff@elkner.net> wrote:
Hi All,
I'm working on an introductory CS book using Python with the turtle module,
Under what license?
Can we talk about using Turtle Art in Sugar as a starting point? it can call Python functions assigned to blocks, providing an easy transition from pure TA to pure Python. We have support for various other CS topics on TA blocks, including stack operations. I am planning to write a Turing machine in TA, using colored dots as cells on the tape and instructions in the transition table.
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@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin Silent Thunder is my name, and Children are my nation. The Cosmos is my dwelling place, the Truth my destination. http://wiki.sugarlabs.org/go/Replacing_Textbooks
-- Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin Silent Thunder is my name, and Children are my nation. The Cosmos is my dwelling place, the Truth my destination. http://wiki.sugarlabs.org/go/Replacing_Textbooks
On Thu, Jun 2, 2011 at 12:24 PM, Edward Cherlin <echerlin@gmail.com> wrote:
On Thu, Jun 2, 2011 at 08:05, Jeff Elkner <jeff@elkner.net> wrote:
Hi Edward,
The book is licensed under the GNU/FDL and is available here:
Excellent. Thank you.
I'm very familiar with Turtle Art, since a college intern working with me last Summer did a Sugar to Gnome port of it, which in now in the debian repositories:
http://packages.debian.org/search?keywords=turtleart
This Summer we will work to get that into Fedora.
I should talk to someone about getting it into Ubuntu, to add to Logo, kturtleart, and the turtle art module in Etoys. ^_^
It is already in Ubuntu, Edward, by way of Debian...
While as a classroom teacher I'm a huge fan of turtle art, Python's own turtle module is the tool of choice for my current intro college leve textbook project, since it runs on all major platforms and is part of the Python standard library.
I am planning a multi-year grade school sequence to introduce CS ideas using TA, with a transition from TA to Python by way of Python blocks in TA. I will take a look at your work, and see whether it makes sense to treat it as a followup to mine, or rather to design mine to lead into yours.
Among the topics I intend to emphasize are Church's Thesis, Gödel recursive functions, parse trees, stack programming (and hence RPN), language interpretation, and building a Turing Machine in pure TA.
Awesome! I can't wait to see what you come up with. jeff
Thanks!
jeff elkner open book project http://openbookproject.net
On Wed, Jun 1, 2011 at 6:37 PM, Edward Cherlin <echerlin@gmail.com> wrote:
On Tue, May 31, 2011 at 16:59, Jeff Elkner <jeff@elkner.net> wrote:
Hi All,
I'm working on an introductory CS book using Python with the turtle module,
Under what license?
Can we talk about using Turtle Art in Sugar as a starting point? it can call Python functions assigned to blocks, providing an easy transition from pure TA to pure Python. We have support for various other CS topics on TA blocks, including stack operations. I am planning to write a Turing machine in TA, using colored dots as cells on the tape and instructions in the transition table.
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@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin Silent Thunder is my name, and Children are my nation. The Cosmos is my dwelling place, the Truth my destination. http://wiki.sugarlabs.org/go/Replacing_Textbooks
-- Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin Silent Thunder is my name, and Children are my nation. The Cosmos is my dwelling place, the Truth my destination. http://wiki.sugarlabs.org/go/Replacing_Textbooks
On Thu, Jun 2, 2011 at 7:49 PM, Jeff Elkner <jeff@elkner.net> wrote:
On Thu, Jun 2, 2011 at 12:24 PM, Edward Cherlin <echerlin@gmail.com> wrote:
On Thu, Jun 2, 2011 at 08:05, Jeff Elkner <jeff@elkner.net> wrote:
Hi Edward,
The book is licensed under the GNU/FDL and is available here:
Excellent. Thank you. +1
also, i might finally take the chance of teaching (and learning) CS for high school students next year, alongside with robotics; i can't contribute at the moment to your book but i definitely need educational material for all the range from TA to pure Python, so please keep us posted ! regards -- roberto
participants (5)
-
Edward Cherlin
-
Gregor Lingl
-
Jeff Elkner
-
roberto
-
Vern Ceder