Hi educators! One of the hardest problems I've encountered upto now is to decide, when a piece of software is ready to be be published. I've decided, that my new turtle graphics module ready now. A package, which additionally contains some example scripts. a tiny demoViewer and some documentation can be downloaded from: http://ada.rg16.asn-wien.ac.at/~python/xturtle From now on it's the user community, which will largely determine the future development of the module. I hope that it will grow to more than one user (which is me) soon. (*) And I'm willing to continue development (preferably in cooperation with others) until it's considered a really useful tool by the community. In my opinion it should replace the current turtle.py in the standard distribution. We will see if others join me in this respect ... (Please note, that xturtle.py is a complete reimplementation of what I've shown to you some ten weeks ago.) For now I'll not write too much about it, but ask you for feedback and contributions to a discussion about the module. (You'll find some more information on the webpage mentioned above!) However, I'll give a talk at Europython 2006 on July 5th about: xturtle - an extended turtle module for Python as a vehicle for teaching programming concepts. For this, too, your feedback will be welcome. And you'll get back the slides of the talk ;-) Regards, Gregor Lingl (*) This hope seems reasonable since I intend to use it in the forthcoming 2nd edition of "Python für Kids"
Thank you Gregor. I am studying your web site and product. I'm not expecting to make it to EuroPython this year, but maybe next. In the meantime, I look forward to continued collaborations via edu-sig. Kirby On 6/22/06, Gregor Lingl <glingl@aon.at> wrote:
Hi educators!
Hi Gregor, I tried it out on OS X and it works great. There are some very beautiful demos. I will try to dig under the hood at some point and see if it would be feasible to replace Tinker with Cocoa (conditionally, if the user has PyObjC installed, otherwise it could fall back to Tkinter). Putting it into Javascript would probably be possible, and there is even a workaround for <canvas> in IE, but the performance would definitely take a hit. Great work. I should take a look at Rur-ple now... --Dethe
Dethe Elza schrieb:
Hi Gregor,
I tried it out on OS X and it works great. There are some very beautiful demos. I will try to dig under the hood at some point and see if it would be feasible to replace Tinker with Cocoa (conditionally, if the user has PyObjC installed, otherwise it could fall back to Tkinter).
Ah fine, please do so - (and keep us informed). There is one single class, TurtleScreenBase, which contains the interface to Tkinter. It was one of my primary design decisions, to keep this small and isolated. (I had in mind e.g. porting it to Jython). So at first concentrate on that small part of the thing. Unfortunately this part of the software is still not very well documented (albeit it doesn't contain special intricacies). If you have questions, feel free to ask. (Of course that doesn't apply to the demoViewer ...) Best wishes Gregor
Putting it into Javascript would probably be possible, and there is even a workaround for <canvas> in IE, but the performance would definitely take a hit.
Great work. I should take a look at Rur-ple now...
--Dethe _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Yes, I'm liking the demos too and will say something in my blog today. Question: say a student has just booted IDLE and wants to run the minimum import and turtle commands to draw a triangle, what would that look like? I believe I will be able to answer my own question with just a little more study. I am wondering if an xturtle package with an __ini__.py would make sense. Kirby On 6/23/06, Gregor Lingl <glingl@aon.at> wrote:
Dethe Elza schrieb:
Hi Gregor,
I tried it out on OS X and it works great. There are some very beautiful demos. I will try to dig under the hood at some point and see if it would be feasible to replace Tinker with Cocoa (conditionally, if the user has PyObjC installed, otherwise it could fall back to Tkinter).
Ah fine, please do so - (and keep us informed). There is one single class, TurtleScreenBase, which contains the interface to Tkinter. It was one of my primary design decisions, to keep this small and isolated. (I had in mind e.g. porting it to Jython). So at first concentrate on that small part of the thing.
Unfortunately this part of the software is still not very well documented (albeit it doesn't contain special intricacies). If you have questions, feel free to ask.
(Of course that doesn't apply to the demoViewer ...)
Best wishes Gregor
Putting it into Javascript would probably be possible, and there is even a workaround for <canvas> in IE, but the performance would definitely take a hit.
Great work. I should take a look at Rur-ple now...
--Dethe _______________________________________________ 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
kirby urner schrieb:
Yes, I'm liking the demos too and will say something in my blog today. Question: say a student has just booted IDLE and wants to run the minimum import and turtle commands to draw a triangle, what would that look like? IDLE 1.2b1 ==== No Subprocess ====
from xturtle import * onClick(goto)
;-)
I believe I will be able to answer my own question with just a little more study. I am wondering if an xturtle package with an __ini__.py would make sense.
What for? Gregor
Kirby
I believe I will be able to answer my own question with just a little more study. I am wondering if an xturtle package with an __ini__.py would make sense.
What for? Gregor
Kirby
from xturtle import *
Traceback (most recent call last): File "<pyshell#0>", line 1, in -toplevel- from xturtle import * ImportError: No module named xturtle Because I want all my xturtle stuff in a subfolder beneath site-packages (on either Linux or Windows). I could make it a package myself, but I think for distribution purposes, a distro with as many files as yours (including documentation) deserves its own subdirectory. Kirby
Gregor, Well done! xturtle.py is a truly impressive re-implementation and enhancement. I ran all of the demos without problems on a Linux (Ubuntu Dapper) machine and was very impressed with the speed, as well as the number, variety and quality of the demos. I would certainly think that (after testing ;) ) xturtle might replace the current turtle.py. I had also been thinking about what would be involved in porting turtle.py to Jython and your refactoring makes that a much more appealing possibility. I saw that you were presenting at EuroPython - best of luck with that presentation. I'll be presenting on Python programming at NECC, a national educational computing conference, on July 7, so if you don't mind I will mention xturtle then. One final thought - even though the file is large, I would consider including at least some demo code in the file itself. Maybe it's just me, but I like the idea of being able to demo the module even if it gets separated from all other files in the package. Things like that can happen. :) Cheers, Vern Gregor Lingl wrote:
Hi educators!
One of the hardest problems I've encountered upto now is to decide, when a piece of software is ready to be be published.
I've decided, that my new turtle graphics module ready now. A package, which additionally contains some example scripts. a tiny demoViewer and some documentation can be downloaded from:
http://ada.rg16.asn-wien.ac.at/~python/xturtle
From now on it's the user community, which will largely determine the future development of the module. I hope that it will grow to more than one user (which is me) soon. (*) And I'm willing to continue development (preferably in cooperation with others) until it's considered a really useful tool by the community.
In my opinion it should replace the current turtle.py in the standard distribution. We will see if others join me in this respect ...
(Please note, that xturtle.py is a complete reimplementation of what I've shown to you some ten weeks ago.)
For now I'll not write too much about it, but ask you for feedback and contributions to a discussion about the module. (You'll find some more information on the webpage mentioned above!)
However, I'll give a talk at Europython 2006 on July 5th about:
xturtle - an extended turtle module for Python as a vehicle for teaching programming concepts.
For this, too, your feedback will be welcome. And you'll get back the slides of the talk ;-)
Regards, Gregor Lingl
(*) This hope seems reasonable since I intend to use it in the forthcoming 2nd edition of "Python für Kids"
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "edupython" group. To post to this group, send email to edupython@googlegroups.com To unsubscribe from this group, send email to edupython-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/edupython -~----------~----~----~----~------~----~------~--~---
-- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137
Vern Ceder schrieb:
Gregor,
Well done! xturtle.py is a truly impressive re-implementation and enhancement. I ran all of the demos without problems on a Linux (Ubuntu Dapper) machine and was very impressed with the speed, as well as the number, variety and quality of the demos.
I would certainly think that (after testing ;) ) xturtle might replace the current turtle.py. btw, who is responsible for a decision about this? I even don't know whom I should contact. I think you should know ;-) I had also been thinking about what would be involved in porting turtle.py to Jython and your refactoring makes that a much more appealing possibility.
If you have more concrete ideas concerning this, please let me know.
I saw that you were presenting at EuroPython - best of luck with that presentation. I'll be presenting on Python programming at NECC, a national educational computing conference, on July 7, so if you don't mind I will mention xturtle then.
Of course not. (Naturally) I'm very interested in making xturtle pupular. I did it because I'm convinced that it could help popularize (is this an English word?) Python in the educational arena as well as make life of the educators a bit easier (and funnier (- in the sens of 'Have fun!')).
One final thought - even though the file is large, I would consider including at least some demo code in the file itself. Maybe it's just me, but I like the idea of being able to demo the module even if it gets separated from all other files in the package. Things like that can happen. :)
That's right. One could use 'oldTurtleDemo.py' for this (now that gets imported). I'll think about it and perhaps I'll have some ideas to make it more funny .... I'll do a proposal. (I'm glad, that all of you expressed, that you like xturtle much!) Best wishes Gregor
Cheers, Vern
On 23/06/06, Gregor Lingl <glingl@aon.at> wrote:
Hi educators!
One of the hardest problems I've encountered upto now is to decide, when a piece of software is ready to be be published.
Hello, Well, I don't know but if it can help I've just jogged with a podcast conference (IT conversations podcast feed) saying that: "Great quyote from Michael Goldfarber, the Einstein of Attention. "The best guarantee for attention is living your life as openly as possible, expressing yourself as publicly as possible as early as possible." Information attracts attention: to get attention, you need to give information. Receiving information makes you influential. There's a definition we came to that suggests that influence is the amount of attention you get relative to the amount of attention you give." http://radar.oreilly.com/archives/2006/03/etech_seth_goldstein.html I've decided, that my new turtle graphics module ready
now. A package, which additionally contains some example scripts. a tiny demoViewer and some documentation can be downloaded from:
Wow ! - The demos are great. - The doc is very clear and I like to have everything in one page (helps me to find quickly what I search for through a "search")
From now on it's the user community, which will largely determine the future development of the module. I hope that it will grow to more than one user (which is me) soon. (*)
I gave a quick test to the module and I'm already having fun to enslave your turtles to a liberlab board ( http://www.liberlab.net/ ) : http://www.flickr.com/photos/frenchy/173828694/ http://www.flickr.com/photos/frenchy/173828762/ And I'm willing to continue development (preferably
in cooperation with others) until it's considered a really useful tool by the community.
In my opinion it should replace the current turtle.py in the standard distribution. We will see if others join me in this respect ...
Well I'm voting for your module but my influence here is Null ;) (Please note, that xturtle.py is a complete reimplementation
of what I've shown to you some ten weeks ago.)
For now I'll not write too much about it, but ask you for feedback and contributions to a discussion about the module. (You'll find some more information on the webpage mentioned above!)
Just one thing I messed with : I didn't succeed to set the heading with a .gif picture (as a turtle) ie if I do something like (t1 is my turtle): t1.addshape("mypict.gif") t1.shape("mypict.gif") t1.setheading(myangle) => everything is fine but the .gif pict. itself doesn't turn. On the contribution side I'm interested to translate the doc in French. Question: I didn't see any informations about the licencing (and I can't access your website for now which seems down), do you already have a plan for that ? However, I'll give a talk at Europython 2006 on July 5th about:
xturtle - an extended turtle module for Python as a vehicle for teaching programming concepts.
After having the chance to meet Papert and reading his books I do think the concepts behind the turtle geometry (and Logo) are really powerful. I'm glad all this have a new great chance in a web era through the MIT One Laptop Per Child program (Logo came in a pre-web era). Concerning Europython, I'll finally be able to come. I'll also take a liberlab board if you want to see your turtles "jumping" around. For this, too, your feedback will be welcome. And you'll get
back the slides of the talk ;-)
I think it would be good if there is also a video or audio recording for people who can't come. I don't know if Europython will do that or what is their policy but I have a reasonably good DV camcorder, then, if there's no objections I could record it and dump it on Google video (or whatever) if it's fine with you. I could also do that for other conf. If people agree/want to. I also saw that the education track begins only the last day. I would appreciate to meet/identify the pysthonist people interested in education before the last day (to learn from and drink a beer maybe ;) ), are their other people following this list who will go to Europython 2006 ? Thanks for making me having fun with your turtles. cheers francois Regards,
Gregor Lingl
(*) This hope seems reasonable since I intend to use it in the forthcoming 2nd edition of "Python für Kids"
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Hi Gregor, The more I play with the new xturtle the more I like it. Thanks! I've been thinking about the following extension to TurtleScreenBase and I wonder what you and others think of the idea. I like the fact that the turtle starts out in a coordinate system with 0,0 in the middle of the window, and I like the fact that for beginning students 1 unit == 1 pixel on the screen. But, I think that after a student has used the turtle to plot a sin or cos curve and learned about scaling the values to make the plot visible in the window it would be nice to place the turtle in a world coordinate system that matched whatever application the student was working on. For example the gravitaion examples could be done in meters. Let TurtleScreenBase take care of the translation and scaling after for you. The API could be extended by a single call setWorldCoordinates(llx,lly,ulx,uly) that specifies the world coordinates of the lower left corner of the screen and the upper right. (This is very similar to the ortho2 call in openGL. Note, if the student does not call setWorldCoordinates then the turtle functions just as it does now. I've already added this capability to the turtle.py that Vern wrote for Python 2.5 and I don't think it would be too hard to add to TurtleScreenBase. What do you all think? Would this be a useful addition? Gregor, is this something you already have on your todo list? Would you be interested? Thanks, Brad On Jun 22, 2006, at 5:37 PM, Gregor Lingl wrote:
Hi educators!
One of the hardest problems I've encountered upto now is to decide, when a piece of software is ready to be be published.
I've decided, that my new turtle graphics module ready now. A package, which additionally contains some example scripts. a tiny demoViewer and some documentation can be downloaded from:
http://ada.rg16.asn-wien.ac.at/~python/xturtle
From now on it's the user community, which will largely determine the future development of the module. I hope that it will grow to more than one user (which is me) soon. (*) And I'm willing to continue development (preferably in cooperation with others) until it's considered a really useful tool by the community.
In my opinion it should replace the current turtle.py in the standard distribution. We will see if others join me in this respect ...
(Please note, that xturtle.py is a complete reimplementation of what I've shown to you some ten weeks ago.)
For now I'll not write too much about it, but ask you for feedback and contributions to a discussion about the module. (You'll find some more information on the webpage mentioned above!)
However, I'll give a talk at Europython 2006 on July 5th about:
xturtle - an extended turtle module for Python as a vehicle for teaching programming concepts.
For this, too, your feedback will be welcome. And you'll get back the slides of the talk ;-)
Regards, Gregor Lingl
(*) This hope seems reasonable since I intend to use it in the forthcoming 2nd edition of "Python für Kids"
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Brad Miller, PhD Assistant Professor Luther College http://www.cs.luther.edu/~bmiller jabber: bnmnetp@jabber.org
Brad Miller schrieb:
Hi Gregor,
The more I play with the new xturtle the more I like it. Thanks! I've been thinking about the following extension to TurtleScreenBase and I wonder what you and others think of the idea.
I like the fact that the turtle starts out in a coordinate system with 0,0 in the middle of the window, and I like the fact that for beginning students 1 unit == 1 pixel on the screen. But, I think that after a student has used the turtle to plot a sin or cos curve and learned about scaling the values to make the plot visible in the window it would be nice to place the turtle in a world coordinate system that matched whatever application the student was working on. For example the gravitaion examples could be done in meters. Let TurtleScreenBase take care of the translation and scaling after for you. The API could be extended by a single call setWorldCoordinates(llx,lly,ulx,uly) that specifies the world coordinates of the lower left corner of the screen and the upper right. (This is very similar to the ortho2 call in openGL. Note, if the student does not call setWorldCoordinates then the turtle functions just as it does now.
I've already added this capability to the turtle.py that Vern wrote for Python 2.5 and I don't think it would be too hard to add to TurtleScreenBase. What do you all think? Would this be a useful addition? Gregor, is this something you already have on your todo list? Would you be interested?
I've thought about this,but abandoned it for the moment. The xturtle API is already rather 'fat' as the core developers complained. I'll appreciate your proposal. So do it, for now as an experiment. At the moment I'm very busy (and have to concentrate on my Europython talk), but I've several points to say on this. Please wait until end of next week, then I'll be ready to discuss this in depth. Thanks again for your idea Gregor (P.S.: When you have done his enhancement, perhaps you could devise some interesting gravitational systems with real world coordinates?)
Thanks,
Brad
Gregor Lingl wrote:
I've decided, that my new turtle graphics module ready now.
Gregor- Nice work! Just for fun, I've integrated xturle.py with PataPata as a component, and here are a few changes I made to it (in diff format, at the end of this message), in case you are interested. Using PataPata, I was able to interactively build a xturtle script which took parameters, where the parameters were entered via Morphs I made as I needed them (like iterations, or color). I have an example world file with two widgets. Now, obviously, such an activity is not for the beginner user -- but more advanced ones might like being able to make parameterized xturtle functions. Since I use Python2.3 mainly as it is the default install for Debian, I made xturtle.py run with Python2.3 by changing the static methods and the use of sorted(). There might be more Python2.3 issues, but those were the only ones I've come across so far. I also added a line of code to reset TurtleScreen._RUNNING before throwing the Terminator exception, as otherwise you can't restart the turtle if you are using the library in a long running application. When I started playing around with it, that was a big issue for me, so that motivated my adding a BREAK interrupt key response to PataPata (though it only works for the xturtle XTurtleCanvas -- an endless loop doing nothing or just printing will still hang TK and PataPata). Now, whether you want to make it run with Python2.3 may be debatable, and you may well use those static methods in other code, so making them instance methods may well break other demos. But you most probably want to reset the _Running flag in any case. PataPata 0.1.19 has the XTurtleCanvas.py component in it, but the extra BREAK handling code is only in the latest stuff I've been adding to SVN here: http://svn.sourceforge.net/viewcvs.cgi/patapata/trunk/PataPata/ By the way, here is a simple world file written by PataPata that uses an XTurtleCanvas: http://svn.sourceforge.net/viewcvs.cgi/patapata/trunk/PataPata/WorldWithXTur... Note how the color and iterations are taken from GUI widget Morphs in the section: def mouseClick(self): reset() down() color(self.components.colorEntry.text) for i in range(int(self.components.iterationsEntry.text)): forward(100) right(91) forward(50) This is the file that defines the XTurtleCanvas (among other things): http://svn.sourceforge.net/viewcvs.cgi/patapata/trunk/PataPata/WorldCommonPC... This is the relevant xturtle specific code to make an XTurtleCanvas: XTurtleCanvas = world.newPrototype("Morph") XTurtleCanvas.size = (200, 200) XTurtleCanvas.pen = None def _newWidget(self): xturtle._root = self.world.widget newCanvas = xturtle.ScrolledCanvas(self.container.widget) xturtle._canvas = newCanvas self.setAttributeWithoutSideEffects("pen", xturtle.Pen()) xturtle._pen = self.pen return newCanvas XTurtleCanvas._newWidget = _newWidget def _destroyEmbeddedWidget(self): if self.widget: if xturtle._canvas == self.widget: xturtle._canvas = None if xturtle.pen == self.pen: xturtle._pen = None self.widget.destroy() self.widget = None self.setAttributeWithoutSideEffects("pen", None) XTurtleCanvas._destroyEmbeddedWidget = _destroyEmbeddedWidget def windowFocusIn(self): if self.widget: xturtle._canvas = self.widget xturtle._pen = self.pen XTurtleCanvas.windowFocusIn = windowFocusIn XTurtleCanvas.localProperty("pen").writeFunction = "_store_None" XTurtleCanvas.localProperty("pen").copyFunction = "_store_None" XTurtleCanvas.localProperty("pen").setFunction = None world.worldGlobals["XTurtleCanvas"] = XTurtleCanvas (The bit at the end with properties just ensures the pen is read only and is stored as None when the world is saved to a Python file). It was a bit tricky to get the thing to work right with those global functions when you have multiple canvases! I'm still not sure I'm quite satisfied with the result, but basically I swap in _pen and _canvas into the loaded xturtle module from the window's xturtle canvas whenever a TK window gets focus (I had to add that window focus handling too). This would be a problem if there was more than one xturtle canvas on a window, but by then for multiple canvases on one window I assume one could write code that accessed the each canvas's pen directly instead of using those globals functions. Good luck with your talk. Thanks for making such a nice library. --Paul Fernhout $ diff xturtle.py ~/workspace/PataPata/xturtle.py 20a21,22
# PDF -- Modified to work with Python2.3 instead of 2.4 (removed static methods use and sorted() use) # PDF -- added "TurtleScreen._RUNNING = True" before raised Terminator. 292,294c294,297 < < @staticmethod < def _blankimage():
# pdf modified next two methods to not be static so coudl run with
Python 2.3
#@staticmethod def _blankimage(self):
301,302c304,305 < @staticmethod < def _image(filename): ---
#@staticmethod def _image(self, filename):
795a799
TurtleScreen._RUNNING = True
864,865c868,872 < """ < return sorted(self._shapes.keys()) ---
""" # PDF MODIFIED work with Python 2.3 keys = self._shapes.keys() keys.sort() return keys
participants (7)
-
Brad Miller
-
Dethe Elza
-
francois schnell
-
Gregor Lingl
-
kirby urner
-
Paul D. Fernhout
-
Vern Ceder