From pdfernhout at kurtz-fernhout.com Thu Jun 1 01:33:17 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Wed, 31 May 2006 19:33:17 -0400 Subject: [Edu-sig] Accessibility to non CS types? In-Reply-To: <13a83ca10605311456y6ba42e65ie72afbc70c217772@mail.gmail.com> References: <44775EFB.6070606@kurtz-fernhout.com> <13a83ca10605281500h67954015w85cd3f3b4cbca2f1@mail.gmail.com> <447B30F2.60806@kurtz-fernhout.com> <7528bcdd0605301532g2d715a24ve2c3845ad764c9a@mail.gmail.com> <51463.68.34.179.248.1149036503.squirrel@webmail.brynmawr.edu> <13a83ca10605311456y6ba42e65ie72afbc70c217772@mail.gmail.com> Message-ID: <447E27BD.4020306@kurtz-fernhout.com> francois schnell wrote: > Thanks Doug I begin to gather all this on a single page (while testing > googlepages in the same shot...): > http://francois.schnell.googlepages.com/patapata Wow! Beautiful page. Thanks for that and the two new videos. I'm being mostly quiet because I am mostly coding(*). :-) --Paul Fernhout (*) ... coding a TK version. The wx widget dragging bug under GTK (plus other comments here including in the graphics library thread) led me to question using wx further for this. Yet, I want this thing to be usable quicker if people are interested right now than doing all my own widgets in something like Cairo (nice as that would be long term). So, throwing even more performance to the winds, I'm trying to make a TK version of PataPata for easy install since TK comes with Python by default (even on the Mac?), better accessibility to what Python programmers already know (e.g. your liberlab software is in TK), and hopefully be able to support a variety of embedded TK widgets (and Pmw widgets too, etc.). The very first PataPata proof of concept was with TK and had Morph copying issues, but that was before the properties work for wx, so now, bringing the two together, that works (you can now copy a TK button). BUT, I'm stuck on intercepting all ALT mouse activity so embedded widgets can be dragged without messing with their individual events handlers (which I could do as in a try with passing on right click menu events [like I did with the wx Button], but is inelegant and may have other problems). New code is in SVN at patatpata/trunk/PataPata/ (several files) and you can drag all but the Button, and menu interact with all morphs, but the inspector and shell are gone for the moment, so a big step backwards at the moment. :-) Not worth using, though it would be nice to know if it ran on other people's systems if you want to check it out from SVN (the wx version is still there, but renamed PataPataViewerWX). But if I *could* get the embedded widgets to drag, then I could fairly quickly make and maintain the development GUI in itself, as a separate Morph world of wrapped-TK-widgets Morphs. :-) Anyway, one Tkinter book later (_Python and Tkinter programming_) plus lots of newsgroup reading, and I'm still not sure how to do it correctly. Something about writing my own mainloop I think, to get the mouse event before the button or other widget does. But I have a few other leads too. From pdfernhout at kurtz-fernhout.com Thu Jun 1 06:42:17 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Thu, 01 Jun 2006 00:42:17 -0400 Subject: [Edu-sig] Accessibility to non CS types? In-Reply-To: <447E27BD.4020306@kurtz-fernhout.com> References: <44775EFB.6070606@kurtz-fernhout.com> <13a83ca10605281500h67954015w85cd3f3b4cbca2f1@mail.gmail.com> <447B30F2.60806@kurtz-fernhout.com> <7528bcdd0605301532g2d715a24ve2c3845ad764c9a@mail.gmail.com> <51463.68.34.179.248.1149036503.squirrel@webmail.brynmawr.edu> <13a83ca10605311456y6ba42e65ie72afbc70c217772@mail.gmail.com> <447E27BD.4020306@kurtz-fernhout.com> Message-ID: <447E7029.2050407@kurtz-fernhout.com> Paul D. Fernhout wrote: > BUT, I'm stuck on > intercepting all ALT mouse activity so embedded widgets can be dragged > without messing with their individual events handlers (which I could do as > in a try with passing on right click menu events [like I did with the wx > Button], but is inelegant and may have other problems). Well, as a follow up, I could not find an easy way to do what I wanted elegantly, so rather than continue to be bogged down with that, for now I did it the cheap-and-dirty way of overriding mouse event handling in each widget, so now the TK version supports (in a bare-bones fashion) the TK Button, Label, Entry, and Text widgets (and the exampel world file makes one of each type). Also, I added into the source a slightly hacked version of the idlelib TreeWidget to get a tree. I put the source into SVN because I know at least under Debian that Idle is a separate install, so I didn't want to count on that being there for now, though I would have rather used a library version of a tree. Still no inspector or shell (although I guess I could eventually drop in a TK Idle editor window or shell now that it supports wrapping TK widgets. :-) Anyway, hopefully it shows the hope that those non CS types could soon be dragging their Tkinter GUIs around and customizing them as Francois demonstrates. And after that, hopefully someday it is on to Cairo. :-) --Paul Fernhout From pdfernhout at kurtz-fernhout.com Thu Jun 1 07:19:28 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Thu, 01 Jun 2006 01:19:28 -0400 Subject: [Edu-sig] Elementary graphics library In-Reply-To: <24d517dd0605301153j4fda7dd7s34e64449fe3496e1@mail.gmail.com> References: <10c99c2a0605280959n5481b536ue71f28153447a897@mail.gmail.com> <447A0885.6060001@kurtz-fernhout.com> <24d517dd0605281755k72986ee2ye0822b8993a77f41@mail.gmail.com> <447C8C5D.2050506@kurtz-fernhout.com> <24d517dd0605301153j4fda7dd7s34e64449fe3496e1@mail.gmail.com> Message-ID: <447E78E0.9010703@kurtz-fernhout.com> Dethe- Thanks for these other links and comments (especially on wx). Putting all the dozens of options together, I definitely think PyCairo makes a lot of sense because it has been adopted under Linux for GTK (and for Mozilla), so it almost certainly has a future, and would make a solid choice for the library of drawing my own cross-platform widgets, and would avoid me even wanting to write a cross-platform compatibility layer because I could just use it as is (which relates to the original poster's question, although in their case I can still see the point to a simplifying wrapper for education, though less so the need to have multiple back ends). However, there is an ancient Chinese proverb that when confronted with making a decision between 100 different alternatives(*), the best choice is always to "Run Away!". :-) So, along those lines, I decided to start using TK again (used in the first PataPata proof of concept) for several reasons including mostly it is the Python default. I am trying to use its widgets rather than draw my own, and ignore cross-platform font problems, speed issues, bitmap drawing issues, and so on for now. I wanted something to give me some fast progress on the HyperCard/widget front, and at least now I can drag TK buttons now under GTK 2.6 with proper feedback. Though who knows what else will be broken or missing -- I already had to borrow Idle's tree widget. :-) I am also stuck with the tk canvas for drawing (until I understand how PIL works? Or until PyCairo can render to a TK Canvas or Frame?) Also on the plus side, OpenGL should then be available through togl (though I have not tried that, looks like it may no longer be supported?). Still liking wx for general stand-alone applications though. :-) The funny thing is, since PataPata is its own Squeak-like beast, the TK widgets actually look kind of funky and retro in it. :-) Amazing how much of these decisions often hinge on easy installability and ready availability. So, as another comment for the original poster, can TK as a backend meet the basic graphics operations desired? --Paul Fernhout (*) Or a nasty rabbit with long sharp pointy teeth. Dethe Elza wrote: > "The full set of Ginsu 2D interfaces for only $9.95 a month? But > wait, there's more..." > > Mirra > http://www.ixi-software.net/content/body_software_mirra.html > "Mirra is a 2D openGL python library. It defines a set of classes to > render primitive shapes (Text, Pixel, Line, Circle, Rect, Bitmap, > BitmaPolygon) and manages rendering and user input (mouse and > keyboard). Mirra focuses on interaction and implements an event > listener and classes that receive mouse events. (in a way like > macromedia director or flash do). > It runs using pygame(SDL) but it can also be used under wxPython. > Mirra is also thought to teach students (basically design and > multimedia students) programming in python by playing around with > graphics." > > SVGDraw > http://www2.sfk.nl/svg > Create SVG (XML for 2D) images using Python. > > >>My head is spinning. :-) > > > Just wait till we delve into 3D %-) > > >>Just a thought: rather than a new GUI implementation, improving the Python >>GUI FAQ with lots of this information and pros and cons and so on might be >>a very valuable effort just by itself. > > > I think this is an excellent idea. > > >>So much of choices depends on >>specifics and tiny details. For example, I'm fairly happy with wx, but >>there is this bug with dragging certain widgets under GTK 2.6. > > > I haven't used wx for some time, but when I did it a) sucked on OS X, > and b) seemed to be a random mix of reasonably polished widgets and > half-baked crap that would be as useful as writing your resume in > crayon. It also suffers from being huge and very Windows-focused. I > can understand using it on Windows (beats using MFC, but so does > hitting yourself with a ball-peen hammer), but I think it goes > downhill as you move to Linux and drops off the cliff when you go to > OS X. Just my impression, though I've seen the same feelings > expressed elsewhere. I'd sooner use PyGame, and PyGame sucks for > general UI/event handling (by itself, there are libraries on top of > PyGame which help). > > Of all the systems, I think PyCairo has the most momentum (and also > has OpenGL hardware acceleration). Mozilla and GTK are both moving to > Cairo, so it's getting lots of real-world use, profiling, bug-fixing, > and speed-ups. This makes it a bit of a moving target, but the APIs > should be fairly stable even though the implementation is in flux. > > Caveat emptor. I haven't spent a lot of time with any of these (on the > Mac I can access Quartz from Python, which works for me). I'm > planning to explore further for an article or blog at some point, but > any recommendations I make at this point have to be taken with a huge > grain of salt. > > And of > >>course, I also want platform independent fonts (and I'm not sure how to >>get those best, wx uses sizers to get platform independent dialog looks, >>but the sizes may still vary across platforms). Maybe this 2D, 3D, and >>Python GUI efforts needs a web site or blog or something? Some place where >>the nitty gritty details gets hashed out? Might be one already? Kind of >>like this one for programming languages? >> http://lambda-the-ultimate.org/ > > > Maybe just the Python Wiki? > http://wiki.python.org/moin/ > > >>But specific to Python and graphics and user interaction? >> http://www.google.com/search?hl=en&q=python+graphics >>Might be something to think about if it does not already exist. >> >>--Paul Fernhout > > > --Dethe From pdfernhout at kurtz-fernhout.com Thu Jun 1 07:51:32 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Thu, 01 Jun 2006 01:51:32 -0400 Subject: [Edu-sig] Accessibility to non CS types? In-Reply-To: References: <44775EFB.6070606@kurtz-fernhout.com> <13a83ca10605281500h67954015w85cd3f3b4cbca2f1@mail.gmail.com> <447B30F2.60806@kurtz-fernhout.com> <13a83ca10605291548k2619608bx5a4a42a5a1922c32@mail.gmail.com> Message-ID: <447E8064.3090900@kurtz-fernhout.com> kirby urner wrote: > I'm pleased you have become so enthusiastic about Paul's work. I know you know this, but just as an obligatory disclaimer, if PataPata is any good, while I can (and will :-) certainly take some credit for yet another attempt at putting constructivist educational ideas (and a prototype-programming paradigm) into a Pythonic context, the vast bulk of the ideas are coming through others like David Ungar, Adele Goldberg, John Maloney, Randy Smith, Maria Montessori, Dan Ingalls, Alan Kay, Seymour Papert, Grace Llewellyn, Diane Balestri, David Ferguson, and so on -- even Richard Stallman for the free software movement, and of course Guido van Rossum, for making Python so approachable and already prototype-ish. So, "shoulders of giants" and all that. :-) By the way: "Shoulders of Giants -- A Paper on the Inevitability of Open Source Dominance" http://www.cyber.com.au/users/conz/shoulders.html And there is nothing like even one interested user to motivate improvements. It's not so much recognition as just the thought it might actually be useful(*) and so worth the continued investment of time relative to other priorities and interests. --Paul Fernhout (*) From Winnie-The-Pooh: Chapter 7: "Piglet was so excited at the idea of being Useful that he forgot to be frightened any more, and when Rabbit went on to say that Kangas were only Fierce during the winter months, being at other times of an Affectionate Disposition, he could hardly sit still, he was so eager to begin being useful at once." From andre.roberge at gmail.com Thu Jun 1 12:00:34 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Thu, 1 Jun 2006 07:00:34 -0300 Subject: [Edu-sig] Elementary graphics library In-Reply-To: <447E78E0.9010703@kurtz-fernhout.com> References: <10c99c2a0605280959n5481b536ue71f28153447a897@mail.gmail.com> <447A0885.6060001@kurtz-fernhout.com> <24d517dd0605281755k72986ee2ye0822b8993a77f41@mail.gmail.com> <447C8C5D.2050506@kurtz-fernhout.com> <24d517dd0605301153j4fda7dd7s34e64449fe3496e1@mail.gmail.com> <447E78E0.9010703@kurtz-fernhout.com> Message-ID: <7528bcdd0606010300x3da3d686v7d1e5800febd1bfc@mail.gmail.com> On 6/1/06, Paul D. Fernhout wrote: > > > Amazing how much of these decisions often hinge on easy installability and > ready availability. So, as another comment for the original poster, can TK > as a backend meet the basic graphics operations desired? > > Doubtful, since Johannes's intent is to render graphics in a web browser, not in a separate window. Andr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060601/6a1fe149/attachment.htm From kirby.urner at gmail.com Thu Jun 1 18:29:19 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 1 Jun 2006 09:29:19 -0700 Subject: [Edu-sig] Accessibility to non CS types? In-Reply-To: <447E8064.3090900@kurtz-fernhout.com> References: <44775EFB.6070606@kurtz-fernhout.com> <13a83ca10605281500h67954015w85cd3f3b4cbca2f1@mail.gmail.com> <447B30F2.60806@kurtz-fernhout.com> <13a83ca10605291548k2619608bx5a4a42a5a1922c32@mail.gmail.com> <447E8064.3090900@kurtz-fernhout.com> Message-ID: > I know you know this, but just as an obligatory disclaimer, if PataPata is > any good, while I can (and will :-) certainly take some credit for yet > another attempt at putting constructivist educational ideas (and a > prototype-programming paradigm) into a Pythonic context, the vast bulk of > the ideas are coming through others like David Ungar, Adele Goldberg, John > Maloney, Randy Smith, Maria Montessori, Dan Ingalls, Alan Kay, Seymour > Papert, Grace Llewellyn, Diane Balestri, David Ferguson, and so on -- even > Richard Stallman for the free software movement, and of course Guido van > Rossum, for making Python so approachable and already prototype-ish. Yes, I also acknowledge Stallman in my writings about Gnu Math for obvious reasons. Just today in fact: http://controlroom.blogspot.com/2006/06/gnu-math.html I also admire many of the constructivists you mention. Adele I met at an OSCON in 2004 I think it was (she listened to my Pythonic math talk, along with Guido). She emphasized to me how backward the math faculties were, helping me see why we'd need to use TV and the Internet more, if gnu math were to have a hope in hell. Alan was fun to drink beer with in London. Seymour I've not met yet (hope to). We enrolled my daughter in a Montessori school for kindergarten. BTW, there's a small edge separating constructivism from constructionism, with some of the differences addressed in this paper: http://learning.media.mit.edu/content/publications/EA.Piaget%20_%20Papert.pdf Anyway, today is another long day doing OO programming for a hospital system (a client). Visual FoxPro mostly, with Python around the edges for janitorial and utility work. VFP is great for rapid GUI development, plus I like all the embedded SQL (part of the native syntax). Python is cleaner in a lot of ways. During PyCon 2005, I hung out with some guys in DC interested in converging the two cultures (Dabo http://dabodev.com/about ). http://mybizmo.blogspot.com/2005/03/pycon-2005.html Kirby From andre.roberge at gmail.com Thu Jun 1 23:19:33 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Thu, 1 Jun 2006 18:19:33 -0300 Subject: [Edu-sig] RUR-PLE video Message-ID: <7528bcdd0606011419o19658f11h767a70053acae9bb@mail.gmail.com> Hi all! I've created a rur-ple video demo, similar to the one that was made for patapata. It is currently available from the usual place: https://sourceforge.net/project/showfiles.php?group_id=125834 Note that you will need 7zip, also available from sourceforge, to decompress it. The original video file (.avi) is ... 500 Mb. I compressed it to a zip file which reduced it to 100 Mb ... but that was still way too big. After sending it to Ian from ShowMeDo.com (who had initially contacted me suggesting that I made such a video), he pointed out that 7zip could compress files much better. After trying a few options, I managed to compress it down to 5 Mb! The video should appear on ShowMeDo within a week or so, in quicktime format I believe. This was very much a "let's do it, more or less improvised" kind of production, but it should give the flavour of rur-ple (for those that have never tried it). It also made me realise that I need a better microphone :-( Andr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060601/11c9dcd1/attachment.html From pdfernhout at kurtz-fernhout.com Fri Jun 2 22:37:15 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Fri, 02 Jun 2006 16:37:15 -0400 Subject: [Edu-sig] Accessibility to non CS types? In-Reply-To: <7528bcdd0605301532g2d715a24ve2c3845ad764c9a@mail.gmail.com> References: <44775EFB.6070606@kurtz-fernhout.com> <13a83ca10605281500h67954015w85cd3f3b4cbca2f1@mail.gmail.com> <447B30F2.60806@kurtz-fernhout.com> <7528bcdd0605301532g2d715a24ve2c3845ad764c9a@mail.gmail.com> Message-ID: <4480A17B.90908@kurtz-fernhout.com> Andre Roberge wrote: > Indeed! This is really neat. I had downloaded a much earlier version > which left me rather underwhelmed (probably because I had no clue as to > what > patapata was leading to). This is really neat. Congrats Paul! Thanks for the encouragement. --Paul Fernhout From pdfernhout at kurtz-fernhout.com Fri Jun 2 23:22:30 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Fri, 02 Jun 2006 17:22:30 -0400 Subject: [Edu-sig] RUR-PLE video In-Reply-To: <7528bcdd0606011419o19658f11h767a70053acae9bb@mail.gmail.com> References: <7528bcdd0606011419o19658f11h767a70053acae9bb@mail.gmail.com> Message-ID: <4480AC16.902@kurtz-fernhout.com> Looking forward to the ShowMeDo version if it runs in a web browser? Presumably it it be somewhere here? http://showmedo.com/videos/python Interesting site with a bunch of Python videos. Love to see the link when it is up. Making the video seems like half the battle, but, no offense, making it run when viewing a web page (from Flash? Or Quicktime?) is probably the other half. (Easy for me to say, given I never tried it myself, or even know where to start. :-) There is also the more general "YouTube" site. My wife recently sent me this link from there: "Multi-Touch Interaction Research" http://youtube.com/watch?v=0l29zW4_W5E Amazing images of the future (R&D of today) of touch-based computing! I assume that is all working software and hardware they are demonstrating? Something else for me to think about for PataPata (which means "touch, touch" in Xhosa and related South Africa area languages, think "pat pat"). After Francois' video, I'm really seeing the power of a few minute video to present enough of an idea to motivate you to download it and explore it on your own. Of course, when I did work in robotics years ago, everyone made videos -- but usually because something always went wrong when you demonstrated it live. :-) Still, having seen something work, even briefly, I think you can be more motivated to push through all the install and configuration issues. Screenshots do a lot, but they can't convey a certain level of interaction easily. So, another thing to consider for video design is whether to do a walk through tutorial, or do one like the link above on "Multi-Touch Interaction Research" which is just skipping through short examples with a music soundtrack. Of course, doing at least one of each might be ideal. Hey, maybe if I could import your RUR-PLE components into PataPata somehow, we could do one video about both? :-) Anyway, something to think about down the road when/if I can start raiding other projects (respectfully :-) for great code and ideas (PythonCard is on my list too. :-) By the way, on microphones, having worked in a speech recognition group long ago, quality microphones as well as proper microphone positioning do make a huge difference, and I would suggest a wearable headset, such as for example something by Andrea, http://www.andreaelectronics.com/Buy/headsets.htm http://www.andreaelectronics.com/Buy/ProductDesc/NC91.htm for the best quality sound (almost any manufacturer's ~US$30 headset microphone will probably be good enough though). In watching movies, it seems people are much more forgiving of poor video quality then poor sound quality, strangely enough. Perhaps humans are used to seeing images obscured by things like leaves and tall grass or dust or haze, whereas sounds are almost always crisp. For tips and tests on microphone positioning, you can use one of the speech recognition packages. You might find an old boxed package somewhere cheap you could use just for the microphone positioning feedback, and they often come with good enough microphones. But if you do it on your own, perhaps some of the speech recognition advice might be useful? Which is to position the headset microphone boom receiver part far enough away and a little to one side of your mouth so that you capture the speech sound well enough without getting too much general breathing and too many air puffs on various specific words. So, if you are already using a headset microphone and you are not happy with the sound quality, you could try just positioning what you have differently too, and see how that works for you. All the best. --Paul Fernhout Andre Roberge wrote: > Hi all! > > I've created a rur-ple video demo, similar to the one that was made for > patapata. It is currently available from the usual place: > https://sourceforge.net/project/showfiles.php?group_id=125834 > Note that you will need 7zip, also available from sourceforge, to > decompress > it. > > The original video file (.avi) is ... 500 Mb. I compressed it to a zip > file > which reduced it to 100 Mb ... but that was still way too big. After > sending it to Ian from ShowMeDo.com (who had initially contacted me > suggesting that I made such a video), he pointed out that 7zip could > compress files much better. After trying a few options, I managed to > compress it down to 5 Mb! > > The video should appear on ShowMeDo within a week or so, in quicktime > format > I believe. > > This was very much a "let's do it, more or less improvised" kind of > production, but it should give the flavour of rur-ple (for those that have > never tried it). It also made me realise that I need a better microphone > :-( > > Andr? From pdfernhout at kurtz-fernhout.com Sat Jun 3 00:52:51 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Fri, 02 Jun 2006 18:52:51 -0400 Subject: [Edu-sig] Elementary graphics library In-Reply-To: <7528bcdd0606010300x3da3d686v7d1e5800febd1bfc@mail.gmail.com> References: <10c99c2a0605280959n5481b536ue71f28153447a897@mail.gmail.com> <447A0885.6060001@kurtz-fernhout.com> <24d517dd0605281755k72986ee2ye0822b8993a77f41@mail.gmail.com> <447C8C5D.2050506@kurtz-fernhout.com> <24d517dd0605301153j4fda7dd7s34e64449fe3496e1@mail.gmail.com> <447E78E0.9010703@kurtz-fernhout.com> <7528bcdd0606010300x3da3d686v7d1e5800febd1bfc@mail.gmail.com> Message-ID: <4480C143.7040901@kurtz-fernhout.com> Oh right, sorry, I'd lost sight of the fact it was in a web browser. I've been wrestling with related issues for PataPata in choosing a specific graphics library or creating a simplified cross-platform display context, so I am a little mixed up here. Still, just to show it can be done in theory (doesn't mean it's worth doing of course :-) see: http://mail.python.org/pipermail/image-sig/2003-July/002332.html Evidently, you can convert a TK canvas to postscript, and then postscript to something else with another tool (e.g. Ghostscript), though no one replied to the question directly of how to make a PNG easily. Or you can grab pixels off the screen. And for Ruby, you can do it: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/63279 "If your Tcl/Tk supports it and your Ruby/Tk links such Tcl/Tk, probably you can use the following line. ph = TkPhotoImage.new('format'=>'window', 'data'=>canvas_widget_path)" Though that solution may depend on platform availability. In either case, I'm not sure if you can draw to a TK canvas without having the canvas widget displayed somewhere (which might be doable on a web server in theory, but would be tricky in practice). So, Cairo is a good approach for a web app and can easily do that without a GUI as the sample code shows: http://cairographics.org/pycairo === on Cairo as the choice === I'm definitely getting the warm fuzzies about Cairo given that, as Dethe says, both Mozilla and GTK have adopted it. In which case, I will elaborate my earlier comment on one proposed design goal here at http://crunchy.python-hosting.com/wiki/GraphicsDoc of: "The library is designed to be simple, easily extensible, and work with different back end rendering engines." I'd like to raise the issue of whether to try to make a new cross-platform context, or whether to just commit to Cairo as being cross platform enough (maybe with just a minor wrapper for Cairo if you wanted something simpler). On that point, I'm just trying to get at the notion that if a cross-platform toolkit like Cairo exists (since TK is at best awkward as another cross-platform choice), then perhaps having another cross-platform layer on top of that starts to be questionable as part of the goal, since it would seem that it might add to the complexity of developing the code with an extra layer of indirection. I agree, multiple back ends sound nice in theory, I'm just wondering if in practice it is worth the effort given a cross-platform choice exists (I'm wrestling with the same issue with PataPata). If Johannes commits to Cairo (at least, for now), it seems he could just subclass the context, add a few convenience methods to make triangles or do a turtle and such, and you then have something that is easy to use and *still* powerful. So, from an eXtreme programming point of view (i.e. "don't write code or add complexity before you are sure you'll need it"), I'd suggest then either just go with Cairo as an expected part of the system, or at most just make a thin simplified wrapper around Cairo, and if later there is a demand for other back ends, then add the layer then. And with the 100% Cairo approach, then the comment "There is no way it should be used for real world graphics - its sole purpose is educational." would no longer be needed. Kids would start off with this, say, "EasyCairo" context they can do some simple things with easily, and then, if they get curious, suddenly they could find themselves drawing warped text as quick speeds, when they realize it has inherited methods they could use. Or, not having looked at the implementation of pyCairo, if for some reason it could not be subclasses, one cold write a wrapper object or even just plain convenience functions that took it as an argument. I think there is a subtle point here about educational philosophy I can't quite put into words. Maybe it is something like, "Making real tools easier and safer to use so people can learn to do simple things with them more quickly is good (e.g. convenience functions for Cairo to draw circles); making "educational" tools that people can only do simple things with and then hit an artificial ceiling with and then get frustrated about as then need to move onto something else is bad (e.g. an entirely new display context you can only draw a few things with)."? And I think "Python" as a learning environment reflects that point. It is easy to start using Python, but unlike an "educational" version of, say, Logo or Basic doesn't force you to jump ship when the going gets tough, or when you design you want to use something to get real work done with. And I think that is why it is one of the best choices for people first learning programming. Sure, other languages have their uses, but Python can get you pretty far and then still be useful (as glue). In this case, because I guess it would probably be so easy to either just subclass or write a few functions for a Cairo context otherwise, it becomes a design goal issue of, "Is it more important to *potentially* support multiple backends for a simple display context, or is it more important to provide a display context that is easy to use and yet does not limit a kid's imagination and possibilities once they get started with it (assuming it runs on the platform they have access to)?". So anyway, looking back at Johannes' original proposal, http://users.ox.ac.uk/~orie1763/coder-python.pdf it seems to me that just making Cairo a little easier to use would still fulfill the intent there (including being cross-platform enough), while not creating any artificial limits on what kids could do. Installation and availability still may be an issue, of course, but long term, won't that be solved for Cairo if Mozilla and GTK use it? Still, I should admit to being a little self-serving with my argument here; if Python educators got behind a good cross-platform standards like, say, Cairo, and GTK, and pygtkglext (for OpenGL), and it got bundled into the main CPython distribution in the future http://wiki.python.org/moin/PythonThreeDotOh (or at least as an easy add-on package for Mac, Win, and GNU/Linux), then I think there would be enormous value for Python in education to have a solid GUI, 2D, and 3D display engines which everyone could count on for being available when introducing people to Python. And, that selection of libraries features in my next post (on PySqueak/PataPata). That level of standardization might be a pipe dream of course, but still, as an edusig community, having a set of technologies like those as commonly recommended ones for intro Python programmers might still be of great benefit (when going beyond the command line or text handling). Right now, if I'm going to write educational software for Python, the only thing I can count on easily being installable cross-platform is TK/Tkinter. And if we are agreeing that is not a good enough solution (say, for web graphics as in this case), then it seems to me it would be nice to push along a good set of emerging standards rather than spend a lot of time writing all sorts of extra abstraction layers to support lots of libraries. I mean sure, if you have a commercial product, fine, support everything, but time is so limited for these things, that having just one good library choice which is a "no brainer" in each area of interest in learning GUI&graphics with Python (widgets, 2D, 3D) can save a lot of time and painful searching. So, maybe this is a variant of, if TK is not good enough anymore as a standard given the things people want to do with Python and how they want them to look, then what's next? An "EasyCairo" display context for Python which is made popular might be an important part of that push. Anyway, just my two cents. :-) --Paul Fernhout Andre Roberge wrote: > On 6/1/06, Paul D. Fernhout wrote: >> Amazing how much of these decisions often hinge on easy installability >> and >> ready availability. So, as another comment for the original poster, >> can TK >> as a backend meet the basic graphics operations desired? >> > Doubtful, since Johannes's intent is to render graphics in a web browser, > > not in a separate window. > > Andr? From pdfernhout at kurtz-fernhout.com Sat Jun 3 01:00:14 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Fri, 02 Jun 2006 19:00:14 -0400 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? Message-ID: <4480C2FE.3060801@kurtz-fernhout.com> Short version: Would people here be willing to install PyGTK 2.x and pygtkglext (OpenGL on GTK) and related files on their machines *if* there was a Python-based software package they *really* wanted to use? Mac and Windows are of issue mainly, since GNU/Linux probably is probably trivial install. Does anyone under Mac or Windows have happy experience doing that for either PyGTK or the 3D extension pygtkglext (either in a home or a lab setting Long version: While exploring the issue of restricted evaluation environments (I am considering having PataPata windows communicate by passing textual Python programs :-) I came across this on Python 3.0 wish list: http://wiki.python.org/moin/PythonThreeDotOh "Include wxPython or PyGtk in core library [for Py3K]? Would anygui also be a good option. Place Tkinter into legacy status? (Musing again. Seems like we need a more mainstream, higher performance standard GUI in the core distribution. wxPython is very popular, so I suggested it as an option. The PyGtk is an awesomely thin layer over the C library and it makes Gtk objects look like native Python classes.)" Now given the wx bashing lately (including from the OSI Chandler project I linked to), and the Cairo blessing(?), that PyGTK comment got me thinking. Also, Francois mentions somewhere he wanted to move beyond TK for his work. Well, I just implemented a rudimentary TK proof-of-concept version of PataPata. And the inspector is live in the world. And I am not as dissatisfied with the look or performance of TK as I thought I would. [Though of course it still needs more work.(*)] BUT, I read that, and the squeaky gears in my brain start creaking, thinking, "hmmm, Python2.x, GTK, and Cairo?". And after a Google, this link has me pretty excited: Writing a Widget Using Cairo and PyGTK 2.8 http://www.pygtk.org/articles/cairo-pygtk-widgets/cairo-pygtk-widgets.htm and so I tried the file there and it ran on my Debian machine without needing to install anything (though I have in the past installed lots of stuff, so I don't know about stock distributions of Debian Python, but clearly this support is just an apt-get away apparently, at least as far as Cairo). From the link: "Cairo is a powerful 2-dimensional graphics library designed to support a number of modern graphics techniques including stroking, alpha blending and antialiasing. It supports multiple output formats, which allows developers to use the same code to display graphics on the screen, print them to the printer or accelerate them with OpenGL. As of GTK+ 2.8, GTK+ has been integrated with the Cairo 1.0 rendering library, giving developers access to this flexible graphics API. PyGTK added Cairo support in the 2.8 version. See the wiki for further info." There is also PyGtkGLExt for Python 3D OpenGL support (though I have not tried it): http://gtkglext.sourceforge.net/ Example Python 3D program: http://mail.gnome.org/archives/gtkglext-list/2004-April/msg00012.html I really like the idea of using something like Cairo if it is picking up steam (see my previous post in "Elementary Graphics Library"). And 3D support sounds good too (rather than the TK developers leaving behind TK's togl :-( ). As I reflect on it, I am also willing to trade-off 90% of popularity for PataPata right now in terms of easy install for Mac/Windows *if* it would make my life under Debian easier to get something neat working that I and a few others want to use, and has the promise of picking up easy install in a couple of years (like if Python3K went with pyGTK as a default). Plus I already have wx and tk versions, so it's not like people could not try the basic idea on those platforms. The issue is more a matter of where I shoudl be putting more energy, since if I could use GTK and Cairo and PyGtkGLExt for cross-platform widgets, 2D graphics, and 3D graphics, then long-term it makes it easier for me to maintain a system using common cross-platform standards, especially because I don't have to put in much of an extra dumbed down "compatibility" layer. For example, I can just pass GTK events around rather than translate them to my own; I can use Cairo calls rather than my own simplified 2D context; I can assume everyone is using the same way to access 3D graphics rather than try to abstract initialization out; and so on. Now, this compatibility issue is a bit more complex, because I would like to run PataPata things as applets on Jython, but I'm not sure that is important enough at the start to prevent using an otherwise promising cross-platform solution CPython works with, given that I'm not sure how important Applets really are, and in the future there might be more person-power to make some GUI object wrappers that runs both on GTK and Swing. Obviously, I could search the PyGTK and gtkglext list archives: http://www.daa.com.au/mailman/listinfo/pygtk http://mail.gnome.org/mailman/listinfo/gtkglext-list/ but I was curious what people here had to say from an educator context. There are also other cool software projects like PythonCAD that use PyGTK: http://www.pythoncad.org/ It woudl be more work to switch yet again, but I find just about anything can be made right if you are willing to start over a couple of times. :-) Or, in short, having done the sensible thing of deciding to "Run away!" to TK when faced with all the choices in the "Elementary graphics library" thread, I'm wondering now whether the "Holy Hand Grenade" sacred relic Brother GTK Maynard from Cairo carries: http://en.wikipedia.org/wiki/Holy_Hand_Grenade_of_Antioch could get the PataPata entourage safely past the killer rabbit of cross-platform issues. :-) I'm certainly not the only one asking that question right around now: http://www.myddrin.com/trashdeerwood/index.cgi/Development/67 http://wiki.osafoundation.org/bin/view/Jungle/TechnologyChoices I've looked in the edusig list's archive and pyGTK is mentioned in about 30 posts over about six thread. Dave Reed on 12/26/2004 05:30 PM was very encouraging of is a year and a half ago. http://mail.python.org/pipermail/edu-sig/2004-December/004302.html He wrote: "I've used it on Linux/Solaris, Windows XP and Mac OS X and it works fine on all of them. If I was coding for Windows only, I'd probably pick a different widget set, but since I have little interest in programming for Windows right now, I think glade/gtk is a great combination." So it seems like by now it should be a fairly safe choice? So, my question to educators or parents here using Mac and Windows is, are you willing to go to the trouble (or have you already?) to make sure PyGTK and a >= 2.8 GTK are running on your system at school or at home *if* there was an application you really wanted to use? Would using PyGTK & PyCairo & pygtkglext be more a show stopper or an incentive? I'm not saying you would do it right now, just more, would you or could you do it if you really wanted to? If so, or if there is at least a sense that it is possible, I think I will be very tempted to (once again) make another version of PataPata (PySqueak) that is GTK oriented. I've never tried to use PyGTK on the Mac or Windows, so any feedback on it's current use in an educational context of for packages you use for other things would be appreciated (i.e. do you already use packages that depend on PyGTK?) --Paul Fernhout (*) The TK version still has a bug retrieving text from a multi-line TK text box. And everything is sloppily floating around. And no save/load world buttons yet. From andre.roberge at gmail.com Sat Jun 3 02:01:37 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Fri, 2 Jun 2006 21:01:37 -0300 Subject: [Edu-sig] Elementary graphics library In-Reply-To: <4480C143.7040901@kurtz-fernhout.com> References: <10c99c2a0605280959n5481b536ue71f28153447a897@mail.gmail.com> <447A0885.6060001@kurtz-fernhout.com> <24d517dd0605281755k72986ee2ye0822b8993a77f41@mail.gmail.com> <447C8C5D.2050506@kurtz-fernhout.com> <24d517dd0605301153j4fda7dd7s34e64449fe3496e1@mail.gmail.com> <447E78E0.9010703@kurtz-fernhout.com> <7528bcdd0606010300x3da3d686v7d1e5800febd1bfc@mail.gmail.com> <4480C143.7040901@kurtz-fernhout.com> Message-ID: <7528bcdd0606021701g6fc1eb8p6c34afa2ba1ca80@mail.gmail.com> On 6/2/06, Paul D. Fernhout wrote: > > Oh right, sorry, I'd lost sight of the fact it was in a web browser. No problem, this thread is full of interesting meanderings. [snip] > > If Johannes commits to Cairo (at least, for now), it seems he could just > subclass the context, add a few convenience methods to make triangles or > do a turtle and such, and you then have something that is easy to use and > *still* powerful. Good point. So, from an eXtreme programming point of view (i.e. > "don't write code or add complexity before you are sure you'll need it"), > I'd suggest then either just go with Cairo as an expected part of the > system, or at most just make a thin simplified wrapper around Cairo, and > if later there is a demand for other back ends, then add the layer then. (Speaking on his behalf, until he comments on his own :-) That is what he wanted to do. However, when trying to design a "library" that could be used by 7 year-old kids ... I think he found out that it was not as easy as he first thought. For example: how do you introduce cartesian coordinates (for positioning graphics objects) in a simple way? Any suggestion for what the API should look like would be most welcome! And with the 100% Cairo approach, then the comment "There is no way it > should be used for real world graphics - its sole purpose is educational." > would no longer be needed. I could not agree more with this approach (see below). Kids would start off with this, say, > "EasyCairo" context they can do some simple things with easily, and then, > if they get curious, suddenly they could find themselves drawing warped > text as quick speeds, when they realize it has inherited methods they > could use. Or, not having looked at the implementation of pyCairo, if for > some reason it could not be subclasses, one cold write a wrapper object or > even just plain convenience functions that took it as an argument. > > I think there is a subtle point here about educational philosophy I can't > quite put into words. Maybe it is something like, "Making real tools > easier and safer to use so people can learn to do simple things with them > more quickly is good (e.g. convenience functions for Cairo to draw > circles); making "educational" tools that people can only do simple things > with and then hit an artificial ceiling with and then get frustrated about > as then need to move onto something else is bad (e.g. an entirely new > display context you can only draw a few things with)."? > > And I think "Python" as a learning environment reflects that point. It is > easy to start using Python, but unlike an "educational" version of, say, > Logo or Basic doesn't force you to jump ship when the going gets tough, or > when you design you want to use something to get real work done with. And > I think that is why it is one of the best choices for people first > learning programming. Indeed. And, if I may use it as an example, I think this is one of the strength of RUR-PLE in comparison with Guido van Robot (or Logo, or whatever else.) RUR-PLE is Python ... with a few pre-defined commands. In fact, executing a RUR-PLE program is done via something like exec "user_code" in my_globals() I do some minor pre-processing of the "user_code" part to disallow import statements and a few others (for security reason in a classroom environment, to prevent kids sharing "dangerous" programs), but pretty much any valid Python code can be executed! [snip] > > So anyway, looking back at Johannes' original proposal, > http://users.ox.ac.uk/~orie1763/coder-python.pdf > it seems to me that just making Cairo a little easier to use would still > fulfill the intent there (including being cross-platform enough), while > not creating any artificial limits on what kids could do. Installation and > availability still may be an issue, of course, but long term, won't that > be solved for Cairo if Mozilla and GTK use it? Agreed on both points. Still, I should admit to being a little self-serving with my argument > here; if Python educators got behind a good cross-platform standards like, > say, Cairo, and GTK, and pygtkglext (for OpenGL), and it got bundled into > the main CPython distribution in the future > http://wiki.python.org/moin/PythonThreeDotOh > (or at least as an easy add-on package for Mac, Win, and GNU/Linux), then > I think there would be enormous value for Python in education to have a > solid GUI, 2D, and 3D display engines which everyone could count on for > being available when introducing people to Python. I don't consider that having such a library is a self-serving goal :-) However, I am not hopeful that it will get bundled in the main Python distribution. I'll settle for an easy download (and, hopefully, for it to be part of Edubuntu). Andr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060602/46b2abcc/attachment-0001.html From aharrin at luc.edu Sat Jun 3 05:27:19 2006 From: aharrin at luc.edu (Andrew Harrington) Date: Fri, 02 Jun 2006 22:27:19 -0500 Subject: [Edu-sig] Elementary graphics library In-Reply-To: <7528bcdd0606021701g6fc1eb8p6c34afa2ba1ca80@mail.gmail.com> References: <10c99c2a0605280959n5481b536ue71f28153447a897@mail.gmail.com> <447A0885.6060001@kurtz-fernhout.com> <24d517dd0605281755k72986ee2ye0822b8993a77f41@mail.gmail.com> <447C8C5D.2050506@kurtz-fernhout.com> <24d517dd0605301153j4fda7dd7s34e64449fe3496e1@mail.gmail.com> <447E78E0.9010703@kurtz-fernhout.com> <7528bcdd0606010300x3da3d686v7d1e5800febd1bfc@mail.gmail.com> <4480C143.7040901@kurtz-fernhout.com> <7528bcdd0606021701g6fc1eb8p6c34afa2ba1ca80@mail.gmail.com> Message-ID: <44810197.8030709@luc.edu> I am not a great follower of the graphic wars, but I agree with both Andre and Paul from what I have seen. We are talking here about a basic issue with open source infrastructure (and commercial standards for that matter). Is it worth it doing my thing my way that only some will be able to use, or give up something, time at least for now, and agree on a standard? There is the separate issue in Python of what goes in the standard distribution or in edubuntu for that matter. If there is real agreement, ongoing support is more likely to follow, but big players supporting a good looking emerging standard like Cairo certainly does not hurt. Think now about the money for wxPython, which has been coming from Mitch Kapor's OSAF. If his Chandler project is thinking of dropping wx, that is not only an issue about how good wx is as a general system, but where is the support going to come from in the future.... In the Windows world in particular, easy installation is a big deal. That is what the user base is expecting. I was just reading a rave review of the new Ubutu release by someone who only needed to give about100 line of commands and instructions for what 10-15 places to insert them so the Ubuntu version would actually work well on his system. This was supposed to be good enough to attract Windows users. In what universe? Andy Andre Roberge wrote: > On 6/2/06, *Paul D. Fernhout* > wrote: > > Oh right, sorry, I'd lost sight of the fact it was in a web browser. > > > No problem, this thread is full of interesting meanderings. > > [snip] > > > If Johannes commits to Cairo (at least, for now), it seems he > could just > subclass the context, add a few convenience methods to make > triangles or > do a turtle and such, and you then have something that is easy to > use and > *still* powerful. > > > Good point. > > So, from an eXtreme programming point of view ( i.e. > "don't write code or add complexity before you are sure you'll > need it"), > I'd suggest then either just go with Cairo as an expected part of the > system, or at most just make a thin simplified wrapper around > Cairo, and > if later there is a demand for other back ends, then add the layer > then. > > > (Speaking on his behalf, until he comments on his own :-) That is what > he wanted to do. However, when trying to design a "library" that could > be used by 7 year-old kids ... I think he found out that it was not as > easy as he first thought. For example: how do you introduce cartesian > coordinates (for positioning graphics objects) in a simple way? > > Any suggestion for what the API should look like would be most welcome! > > And with the 100% Cairo approach, then the comment "There is no > way it > should be used for real world graphics - its sole purpose is > educational." > would no longer be needed. > > > I could not agree more with this approach (see below). > > Kids would start off with this, say, > "EasyCairo" context they can do some simple things with easily, > and then, > if they get curious, suddenly they could find themselves drawing > warped > text as quick speeds, when they realize it has inherited methods they > could use. Or, not having looked at the implementation of pyCairo, > if for > some reason it could not be subclasses, one cold write a wrapper > object or > even just plain convenience functions that took it as an argument. > > I think there is a subtle point here about educational philosophy > I can't > quite put into words. Maybe it is something like, "Making real tools > easier and safer to use so people can learn to do simple things > with them > more quickly is good (e.g. convenience functions for Cairo to draw > circles); making "educational" tools that people can only do > simple things > with and then hit an artificial ceiling with and then get > frustrated about > as then need to move onto something else is bad (e.g . an entirely new > display context you can only draw a few things with)."? > > And I think "Python" as a learning environment reflects that > point. It is > easy to start using Python, but unlike an "educational" version > of, say, > Logo or Basic doesn't force you to jump ship when the going gets > tough, or > when you design you want to use something to get real work done > with. And > I think that is why it is one of the best choices for people first > learning programming. > > > Indeed. And, if I may use it as an example, I think this is one of > the strength of RUR-PLE in comparison with Guido van Robot (or Logo, > or whatever else.) RUR-PLE is Python ... with a few pre-defined > commands. In fact, executing a RUR-PLE program is done via something > like > exec "user_code" in my_globals() > > I do some minor pre-processing of the "user_code" part to disallow > import statements and a few others (for security reason in a classroom > environment, to prevent kids sharing "dangerous" programs), but pretty > much any valid Python code can be executed! > > [snip] > > > So anyway, looking back at Johannes' original proposal, > http://users.ox.ac.uk/~orie1763/coder-python.pdf > > it seems to me that just making Cairo a little easier to use would > still > fulfill the intent there (including being cross-platform enough), > while > not creating any artificial limits on what kids could do. > Installation and > availability still may be an issue, of course, but long term, > won't that > be solved for Cairo if Mozilla and GTK use it? > > > Agreed on both points. > > Still, I should admit to being a little self-serving with my argument > here; if Python educators got behind a good cross-platform > standards like, > say, Cairo, and GTK, and pygtkglext (for OpenGL), and it got > bundled into > the main CPython distribution in the future > http://wiki.python.org/moin/PythonThreeDotOh > (or at least as an easy add-on package for Mac, Win, and > GNU/Linux), then > I think there would be enormous value for Python in education to > have a > solid GUI, 2D, and 3D display engines which everyone could count > on for > being available when introducing people to Python. > > > I don't consider that having such a library is a self-serving goal > :-) However, I am not hopeful that it will get bundled in the main > Python distribution. I'll settle for an easy download (and, > hopefully, for it to be part of Edubuntu). > > Andr? > >------------------------------------------------------------------------ > >_______________________________________________ >Edu-sig mailing list >Edu-sig at python.org >http://mail.python.org/mailman/listinfo/edu-sig > > -- Andrew N. Harrington Computer Science Department Undergraduate Program Director Loyola University Chicago http://www.cs.luc.edu/~anh 512B Lewis Towers (office) Office Phone: 312-915-7982 Snail mail to Lewis Towers 416 Dept. Fax: 312-915-7998 820 North Michigan Avenue aharrin at luc.edu Chicago, Illinois 60611 From bmiller at luther.edu Sat Jun 3 14:58:53 2006 From: bmiller at luther.edu (Brad Miller) Date: Sat, 3 Jun 2006 07:58:53 -0500 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <4480C2FE.3060801@kurtz-fernhout.com> References: <4480C2FE.3060801@kurtz-fernhout.com> Message-ID: Paul, From a Mac user's perspective I think the answer is probably not. This approach would put PySqueak on a similar trajectory as vpython which requires us to use X11 on the mac in order to get GTK and friends working. Further, this arrangement forces us to make separate builds of python using fink or darwin ports, which in turn gives us two separate python installations on our Macs. Several have tried to port vpython to a native (non-X11-dependent) implementation on the mac over the last few years but nobody has succeeded yet. There is some work in GTK+ 2.9.x to get a native port of GTK working on the mac. Maybe when this effort is finally successful then native versions of vpython and other packages will be easier. So, personally I would be sad to see PySqueak head down this road. But I also think that the effort required to get everything working under X11 would be too difficult for many beginners. Brad On Jun 2, 2006, at 6:00 PM, Paul D. Fernhout wrote: > Short version: > > Would people here be willing to install PyGTK 2.x and pygtkglext > (OpenGL > on GTK) and related files on their machines *if* there was a Python- > based > software package they *really* wanted to use? Mac and Windows are of > issue mainly, since GNU/Linux probably is probably trivial install. > Does > anyone under Mac or Windows have happy experience doing that for > either > PyGTK or the 3D extension pygtkglext (either in a home or a lab > setting > > Long version: > > While exploring the issue of restricted evaluation environments (I am > considering having PataPata windows communicate by passing textual > Python > programs :-) I came across this on Python 3.0 wish list: > http://wiki.python.org/moin/PythonThreeDotOh > "Include wxPython or PyGtk in core library [for Py3K]? Would anygui > also > be a good option. Place Tkinter into legacy status? (Musing again. > Seems > like we need a more mainstream, higher performance standard GUI in the > core distribution. wxPython is very popular, so I suggested it as an > option. The PyGtk is an awesomely thin layer over the C library and it > makes Gtk objects look like native Python classes.)" > > Now given the wx bashing lately (including from the OSI Chandler > project I > linked to), and the Cairo blessing(?), that PyGTK comment got me > thinking. > Also, Francois mentions somewhere he wanted to move beyond TK for > his work. > > Well, I just implemented a rudimentary TK proof-of-concept version of > PataPata. And the inspector is live in the world. And I am not as > dissatisfied with the look or performance of TK as I thought I would. > [Though of course it still needs more work.(*)] BUT, I read that, > and the > squeaky gears in my brain start creaking, thinking, "hmmm, > Python2.x, GTK, > and Cairo?". > > And after a Google, this link has me pretty excited: > Writing a Widget Using Cairo and PyGTK 2.8 > http://www.pygtk.org/articles/cairo-pygtk-widgets/cairo-pygtk- > widgets.htm > and so I tried the file there and it ran on my Debian machine without > needing to install anything (though I have in the past installed > lots of > stuff, so I don't know about stock distributions of Debian Python, but > clearly this support is just an apt-get away apparently, at least > as far > as Cairo). > > From the link: > "Cairo is a powerful 2-dimensional graphics library designed to > support a > number of modern graphics techniques including stroking, alpha > blending > and antialiasing. It supports multiple output formats, which allows > developers to use the same code to display graphics on the screen, > print > them to the printer or accelerate them with OpenGL. As of GTK+ 2.8, > GTK+ > has been integrated with the Cairo 1.0 rendering library, giving > developers access to this flexible graphics API. PyGTK added Cairo > support > in the 2.8 version. See the wiki for further info." > > There is also PyGtkGLExt for Python 3D OpenGL support (though I > have not > tried it): > http://gtkglext.sourceforge.net/ > Example Python 3D program: > http://mail.gnome.org/archives/gtkglext-list/2004-April/ > msg00012.html > > I really like the idea of using something like Cairo if it is > picking up > steam (see my previous post in "Elementary Graphics Library"). And 3D > support sounds good too (rather than the TK developers leaving > behind TK's > togl :-( ). As I reflect on it, I am also willing to trade-off 90% of > popularity for PataPata right now in terms of easy install for Mac/ > Windows > *if* it would make my life under Debian easier to get something neat > working that I and a few others want to use, and has the promise of > picking up easy install in a couple of years (like if Python3K went > with > pyGTK as a default). Plus I already have wx and tk versions, so > it's not > like people could not try the basic idea on those platforms. > > The issue is more a matter of where I shoudl be putting more > energy, since > if I could use GTK and Cairo and PyGtkGLExt for cross-platform > widgets, 2D > graphics, and 3D graphics, then long-term it makes it easier for me to > maintain a system using common cross-platform standards, especially > because I don't have to put in much of an extra dumbed down > "compatibility" layer. For example, I can just pass GTK events around > rather than translate them to my own; I can use Cairo calls rather > than my > own simplified 2D context; I can assume everyone is using the same > way to > access 3D graphics rather than try to abstract initialization out; > and so > on. Now, this compatibility issue is a bit more complex, because I > would > like to run PataPata things as applets on Jython, but I'm not sure > that is > important enough at the start to prevent using an otherwise promising > cross-platform solution CPython works with, given that I'm not sure > how > important Applets really are, and in the future there might be more > person-power to make some GUI object wrappers that runs both on GTK > and Swing. > > Obviously, I could search the PyGTK and gtkglext list archives: > http://www.daa.com.au/mailman/listinfo/pygtk > http://mail.gnome.org/mailman/listinfo/gtkglext-list/ > but I was curious what people here had to say from an educator > context. > There are also other cool software projects like PythonCAD that use > PyGTK: > http://www.pythoncad.org/ > > It woudl be more work to switch yet again, but I find just about > anything > can be made right if you are willing to start over a couple of > times. :-) > Or, in short, having done the sensible thing of deciding to "Run > away!" to > TK when faced with all the choices in the "Elementary graphics > library" > thread, I'm wondering now whether the "Holy Hand Grenade" sacred relic > Brother GTK Maynard from Cairo carries: > http://en.wikipedia.org/wiki/Holy_Hand_Grenade_of_Antioch > could get the PataPata entourage safely past the killer rabbit of > cross-platform issues. :-) > > I'm certainly not the only one asking that question right around now: > http://www.myddrin.com/trashdeerwood/index.cgi/Development/67 > http://wiki.osafoundation.org/bin/view/Jungle/TechnologyChoices > > I've looked in the edusig list's archive and pyGTK is mentioned in > about > 30 posts over about six thread. Dave Reed on 12/26/2004 05:30 PM > was very > encouraging of is a year and a half ago. > http://mail.python.org/pipermail/edu-sig/2004-December/004302.html > He wrote: > "I've used it on Linux/Solaris, Windows XP and Mac OS X and it > works fine > on all of them. If I was coding for Windows only, I'd probably pick a > different widget set, but since I have little interest in programming > for Windows right now, I think glade/gtk is a great combination." > So it seems like by now it should be a fairly safe choice? > > So, my question to educators or parents here using Mac and Windows > is, are > you willing to go to the trouble (or have you already?) to make > sure PyGTK > and a >= 2.8 GTK are running on your system at school or at home *if* > there was an application you really wanted to use? Would using PyGTK & > PyCairo & pygtkglext be more a show stopper or an incentive? I'm not > saying you would do it right now, just more, would you or could you > do it > if you really wanted to? If so, or if there is at least a sense > that it is > possible, I think I will be very tempted to (once again) make another > version of PataPata (PySqueak) that is GTK oriented. I've never > tried to > use PyGTK on the Mac or Windows, so any feedback on it's current > use in an > educational context of for packages you use for other things would be > appreciated (i.e. do you already use packages that depend on PyGTK?) > > --Paul Fernhout > (*) The TK version still has a bug retrieving text from a multi- > line TK > text box. And everything is sloppily floating around. And no save/load > world buttons yet. > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig From pdfernhout at kurtz-fernhout.com Sat Jun 3 20:19:10 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Sat, 03 Jun 2006 14:19:10 -0400 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: References: <4480C2FE.3060801@kurtz-fernhout.com> Message-ID: <4481D29E.1010805@kurtz-fernhout.com> Brad- Thanks for the feedback. That's just what I like to hear even if it is negative. I'll be curious if other Mac users agree. Do you have any preferences for cross-platform Mac support (other than native Cocoa)? Are then either of wx or tk then more appealing from an easy installability stand point right now? Would good support for either of tk or wx then be your "vote"? Or would you (see below) also think Java (with Jython) is OK? And so wx, tk, or Java could all work for you on the mac? Any order of preference? I'd be especially curious if you think PyCairo by itself would have the same installation problems as pyGTK on the mac. Because if it was an easy install, then I could start thinking more on the issue of having a native Cocoa window with related event processing on the Mac, and a GTK one for GNU/Linux, and a something else (wx?) for Windows, but have the widgets draw in Cairo (sort of like Squeak does it, but with Cairo instead of Python bitmap handling). For now it sounds like I should stick with making progress on the TK front and solve as many issues as I can that don't entail too much commitment to a GUI while I continue to get more feedback on this. Here are some more musings on a few more alternatives, trying to emphasize a Mac perspective. === Jython and Java? ==== For me, the easiest Mac development platform that is also cross-platform with an easy install is probably going with Jython and Swing under Java. I've already done projects that way and they were fairly smooth. I like the technology, and even have hopes Sun will free Java one day (or that it won't matter at some point, with other free initiatives). Certainly Java, for good or bad, has made inroads into education, and even if I think the Java language itself has major design problems and limitations, the latest 1.5 JVM itself isn't that bad a platform for other things like Jython. The fact that PataPata under Java would not look completely Mac-like isn't that big an issue (as I see it) as it might be if I was making a plain application. But from a free software perspective, http://www.gnu.org/philosophy/java-trap.html Java has some issues, including installation problems for Java under GNU/Linux (though I'm still seeing how the recent Sun announcement plays out with Debian and free software developers). http://www.sun.com/smi/Press/sunflash/2006-05/sunflash.20060516.4.xml [It is not without controversy.] Still, Jython 2.1 "just works" under most any JVM, and PataPata could go pretty far with just that (including delivering educational applets written in Python/Jython), even ignoring Jython advancements now under way (2.2 alpha). In that case it is the latest Mac users which I would guess are more likely to say "yes" to easy Java use (while holding their noses :-), Windows with a "maybe", but the GNU/Linux camp more likely to say "no" (historically Java doesn't come with GNU/Linux by default, though again, the Sun announcement is having an effect on those policies). Of course there are free Java versions, http://www.gnu.org/software/classpath/ http://www.kaffe.org/ and they might work well enough for my purposes, if I bundled the entire GNU Classpath and a JVM with the distribution (or as an optional 50MB or so "install this first if you have no working Java" package) or just pointed people at it with links. Also, while I can count on a Mac OS X user to have Java pre-installed, the same can't be said for Windows (the maybe). A Jython solution means I can just say, "well it works if you install Java". I don't really think performance will be effected or the software will be that limited by working with Java (other than the limits of Jython 2.1 [and evolving] vs. Python 2.4, though that includes things like not having twisted or Idlelib's rpc). Java even has various OpenGL interfaces (though I have not really used any of them). http://www.opengl.org/resources/java/ So, as a side issue, choosing to focus on Java hinges on if I could expect a lot of teachers in the computer lab or parents at home to have a recent (>= 1.4.2) JVM installed? Or be willing to install one? And I think the answer there is probably mostly "yes", since Java has made big inroads into education. Personally, I do like the idea of using CPython over Jython because it has the latest bells and whistles. And I know people can wrestle with Java issues often on install (though seem to accept that more than for, say, GTK :-) perhaps because they see a bigger win for getting Java to work). And I am leery of "the Java Trap". Still, Jython is a nice system, and I could see even hacking it for prototype performance more easily than CPython in some ways, since I have already studied some how it works under the hood and have a feeling about where I could intervene with how it does lookups for things. Since I would likely bundle Jython and related Python libs with any distribution (so I know what the end user is working with) it isn't that hard to just include a slightly modified Jython for performance in a jar file, whereas perhaps people are more likely to notice and get upset if I bundle in a new version of CPython? (And I would rather be modifying Jython than CPython, since Java is somewhat easier to work with than C.) So, maybe I should think harder about a Jython/Swing version of PataPata (at least as another proof of concept)? It certainly is more preferable to me to do a Jython/Java version with tools I know than to start thinking about doing a native Cocoa version and dealing with that learning curve (plus borrowing my wife's ibook and hunching over a tiny single screen. :-). === another alternative that might be more mac friendly -- GNUStep? === Dethe had suggested GNUStep http://www.gnustep.org/ in the edusig thread discussing PySqueak implementation ideas: http://mail.python.org/pipermail/edu-sig/2006-April/006190.html so maybe I should explore that idea more? From what I see, of the current popular cross-platform tools readily available and (tk, wx, qt, gtk, fox, some others), GNUStep seems like the most advanced in terms of underlying design and it might be the best single candidate if I wanted to have the best looking and most pain-free current Mac support with a cross-platform potential (other than Java)? I know pyGTK and friends is going to work well on GNU/Linux, and be easy to install and so forth, like with Ubuntu/Edbuntu. I know it supposedly will work under Windows and the Mac if you make the effort (though it is painful, especially compared to Java). For Windows, there is even a GTK# under dotNet. http://gtk-sharp.sourceforge.net/ Whereas, I am a little leery of GNUStep (as opposed to pure Mac Cocoa) not being a stable enough platform, especially on Windows, and especially as various new versions are rolled out which might be incompatible and so on. I'm not sure whether it is practical to bundle a GNUStep runtime with a frozen Python package the way, say, I can and have easily done with CPython and wx. I don't know enough about the GNUStep community to really know what I can count on or be confident will run where. In general, there do seem to be a lot of platforms supported by GNUStep. http://www.gnustep.org/resources/sources.html#windows because it is designed in a way to make it back-end neutral. And there is an experimental Cairo port as a backend: http://www.gatago.com/gnu/gnustep/discuss/13547347.html though I would expect you could still use Cairo in you app with GNUStep running on a better supported backend? And OpenGL support exists, though maybe not yet for Windows (here is a comment from a year ago)? http://www.aegidian.org/bb/viewtopic.php?t=664&sid=24191e4c94dcea80e2550886cec62226 Just looking at the web sites and comments about it, I kind of get the feeling stuff like Cairo or OpenGL is still in flux and stuff may or may not work everywhere (although when it does work, it is terrific). I have previously played with GNUStep on my Debian box, though I found it somewhat confusing GUI-wise and doing unexpected (buggy?) things (windows appearing and disappearing erratically, menus only showing up some places, dialogs on the wrong screen, and so on, though that might be in part because I have a three monitor setup and apps don't test for that?). Still, I feel like those could probably be overcome on the Mac and on GNU/Linux fairly readily (given Cocoa and GNUStep have a common OpenStep ancestor, http://wiki.gnustep.org/index.php/Cocoa and given that GNUStep being "GNU" it is probably going to have interested GNU/Linux developers). So, it is Windows that might be left out with that approach? Of course, one of GNUStep's claim to fame is easy change to GUIs , so PataPata isn't such a big win on that platform as it would be under Java or GTK or wx or tk. And, PataPata's approach might possibly conflict with some design principles of GNUStep. Also, the Google results for GnuStep and Python in a search: http://www.google.com/search?hl=en&lr=&q=GnuStep+Python leading mainly to: http://pyobjc.sourceforge.net/ "There is limited support for GNUstep, most of the unittests pass on GNUstep on Linux/ix86. However, we do still have some serious problems with real scripts." which doesn't inspire too much confidence for me that Python+GNUStep everywhere is a popular thing to do (as opposed to Python+Cocoa just on the Mac, which seems popular, e.g. Dethe uses it) or will be fairly painless to manage (whereas pyGTK for GTK with Python is all over the place, and seems to work well out of the box in my own limited testing). === some more general comments === So, GTK might still make more sense for my own early convenience of course if I wanted CPython with modern widgets, 2D, and 3D, with my crossing my fingers Mac versions get easier to install. :-) But I agree with you, that does not then sound like the best solution from today's Mac user's perspective. Surprisingly, I have been finding with now maintaining a wx and a tk version of PataPata that there is not quite as much difficulty as I expected with adding another platform's widgets. So, I could consider maybe keeping a current TK version for everyone and down the road having a GTK version for some fancy stuff which is a headache to install on Mac/Windows? (Assuming you think TK works well enough in practice on the Mac?) Or maybe even a GNUStep version? Or even one for Cocoa? It really isn't that hard to wrap some basic widgets it seems. The big issues with multi-platform support for multiple-widget sets is the multiplication of testing releases on multiple platforms (each of which can have numerous configurations, and versions of various libraries). I don't want to have to do that. Compared to that, there is less work involved to comprehensibly wrap all of a specific widget set, since it is just a one-time thing plus some debugging, and that can also be done incrementally as one decides to use each widget. This professor, Barry Schwartz, at Swarthmore http://www.swarthmore.edu/SocSci/bschwar1/ writes on: "The Paradox of Choice: Why More Is Less" http://www.amazon.com/gp/product/0060005688/103-3423194-6030260?v=glance&n=283155 and "The Tyranny of Freedom" http://www.swarthmore.edu/SocSci/bschwar1/self-determination.pdf about how having too many (mostly similar) choices actually makes people more unhappy and leads to inaction than having just a few good ones. Hopefully PataPata won't get too stuck in that, even though I am spinning my wheels in the cross-platform mud right now at the start. :-) I've been continuing work on the TK version right now, since between keeping current wx and tk it makes a nice challenge for me to get the code factored well (removing duplication), and there is still a lot to do that is not too GUI specific. I've got the tk code browser now working live inside the world (code in SVN, some significant limitations and bugs still though), though of course having the development tools live in the same world you are developing makes for the typical Squeak Smalltalk problem of how you can shoot yourself in the foot by, say, deleting the Inspector Morphs. After solving some other bugs, I hope to get two worlds communicating (one with the world of interest and one with an inspector) through a server, all of which should ideally be GUI neutral, though may impose other dependencies and install issues (like if I use twisted as opposed to Idle's rpc code or something custom). Some security issues to work out there, as ideally I want the worlds communicating by passing Python programs (going with the idea of storing PataPata state as textual Python code, like it currently does for worlds). Anyway, thanks again for the feedback. Any other comments are appreciated. --Paul Fernhout Brad Miller wrote: > From a Mac user's perspective I think the answer is probably not. > This approach would put PySqueak on a similar trajectory as vpython > which requires us to use X11 on the mac in order to get GTK and > friends working. Further, this arrangement forces us to make separate > builds of python using fink or darwin ports, which in turn gives us > two separate python installations on our Macs. > > Several have tried to port vpython to a native (non-X11-dependent) > implementation on the mac over the last few years but nobody has > succeeded yet. There is some work in GTK+ 2.9.x to get a native port > of GTK working on the mac. Maybe when this effort is finally > successful then native versions of vpython and other packages will be > easier. > > So, personally I would be sad to see PySqueak head down this road. > But I also think that the effort required to get everything working > under X11 would be too difficult for many beginners. From francois.schnell at gmail.com Sat Jun 3 23:23:24 2006 From: francois.schnell at gmail.com (francois schnell) Date: Sat, 3 Jun 2006 23:23:24 +0200 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <4481D29E.1010805@kurtz-fernhout.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> Message-ID: <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> On 03/06/06, Paul D. Fernhout wrote: Just for feedback, I've just installed PyGTK & GTK+ 2.8 runtime & pyCairo on a WinXP box and its really quick: 1 exe for each to double click on. http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ The 3D gtkglext is more difficult for now (I didn't find any exe): => mingw , make for win, etc ... Maybe for very *motivated* people (under win and mac-intel), a "heavy-gear" possibility to be sure that most things are well set-up will be a patapata-liveCD (maybe based on something like Morphix - that I might try this summer). While checking this I've just found out that "pyro" made an apparently nice live-CD (with knoppix) : http://www.pyrorobotics.org/?page=PyroLiveCD Actually I think it would also be useful to have a ~ "PythonWorldEdu-LiveCD" with : - Python resources (+ videos) - all the educational Python softs possible (patapata, vpython, Crunchy-Frog, rur-ple, "gnu-math", pyro, pygeo, pygame, pymol, etc ...) - Pyhon and Python bindings apps to make contents with (Blender, Gimp, etc) or to play games. In fact I'd like something I could show to people and say : all this software are done either in Python or you can tinker them with Python (bindings) and if you want to begin to discover/learn Python all you need is the live CD and begin playing with all these. Concerning your java options, I don't know if you've seen the Logo TNG Gui on OS-X : http://education.mit.edu/starlogo-tng/tutorial-videos/ I'm not a big Java fan but if Java applets could help to bring patapata in a browser with some python code background it could be important. For Alan Kay the browser is something to reconsider: http://www.redhat.com/archives/olpc-software/2006-April/msg00035.html (And I would rather be modifying Jython than CPython, > since Java is somewhat easier to work with than C.) So, maybe I should > think harder about a Jython/Swing version of PataPata (at least as another > proof of concept)? Dear me I don't now were you find all this pluridisplinarity and energy ! I don't know what you eat (or drink) in the morning but I want to order the same ;) Concerning the different graphical/GUI choices I just don't now enough yet to be useful but I'm following with interest your investigations. Maybe, If after gathering feedback's you're not sure about the choices to make, I tend to advise to go with the one you "feel" you will have the more fun with :) I'm quite convince of that after reading Pekka Himanen book (phD at 20 ...) which have also an interesting intro of Torwald about the 3 (survival,social, and fun) needs : http://www.pekkahimanen.org/ http://www.netvironments.org/ECulture/Module3/HackerEthic/ francois -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060603/7f4edb58/attachment-0001.htm From pdfernhout at kurtz-fernhout.com Sat Jun 3 23:50:16 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Sat, 03 Jun 2006 17:50:16 -0400 Subject: [Edu-sig] Jython Poll: Java3D apps -- one click works or not? Message-ID: <44820418.8090805@kurtz-fernhout.com> I'm wondering how suitable Jython would be right now for easy-to-install educational 3D apps in Python (e.g. PySqueak/PataPata, but could just as well be any Python 3D app that runs under Jython). So, I would be curious, for those who care to try it, what percentage of people on the edusig list who go to this Java 3D site, https://j3d-webstart.dev.java.net/test/ and click on one of the web start links, will actually see a 3D application window open up on their system and run properly without much effort? This is the simplest test (a rotating cube) so you could just click here: http://download.java.net/media/java3d/webstart/test/HelloUniverse.jnlp One click and you are done (in theory, if your machine has a JVM installed and web start enabled). On my Debian GNU/Linux system, the first was a 4.6 MB download, after accepting a couple of Verisign certificate from Sun for trusted code. Then it just worked. After that, the other apps did not require much of a download, and all just worked. However, I've done lots in the past related to Jython and Java (including enabling web start for some tests), so my system certainly is far from being a stock one. I also just tested it on an iBook G4 and it ran. Though I had to do an extra click for accepting a certificate, plus say "no" to whether I wanted a desktop icon. But I'd consider that a "one click" success. :-) However, I then tried it under another Debian machine and while everything loaded, the window did not display. And I also tried it on that machine under VMWare running Windows 2000, and while a window came up, it was empty. That machine probably does not have proper 3D drivers configured for X Windows, but in any case, it fails the one click test (twice, sadly). So far, we have: Debian/Gnome -- Yes Mac OS X -- Yes Debian/KDE -- No; No window VMWare Windows 2000 under Debian -- No; Empty window. So, I'm running 50% here for four tries. :-) The biggest determinant for Debian GNU/Linux is probably whether I have already tried to get 3D running on the machine. I'm not so much interested right now in who could in theory or practice make these 3D programs run on their machines with effort (though reports related to that are appreciated, of course). I kind of expect, if people are willing to put in some work on any recent computer and OS (minutes to hours), these programs should run (although other things might get broken in the process, if twiddling with any OS's configuration. :-) What I am trying to get at here, as a real world data point, is how many educators (or parents) on this list can just click and get Java3D working at home or in a school computer lab (ignoring the 5MB download, I'm assuming we almost have broadband here?) Even though these are just plain Java applications (using the Java3D library), if there is any significant level of responses of "One clicked worked for me" with few negatives then I would have to rate Jython as a strong candidate for doing 3D with Python with minimal install problems, since if you can run these Java 3D apps, then you should pretty much just as easily be able to run a Jython 3D app. Obviously, this isn't a statistically valid experiment (e.g. only adventurous types may try it), but it is the best I can do easily. If you try it, please mention what OS you tried it on too (Mac OS X, Win 2000, Debian GNU/Linux, etc.). Negative reports very much wanted too, so if you try and it fails, please let us know. Having webstart disabled maybe should count as a negative report, although I'd be curious the app it did run after enabling and how hard the issue was to resolve. --Paul Fernhout From andre.roberge at gmail.com Sat Jun 3 23:53:21 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Sat, 3 Jun 2006 18:53:21 -0300 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> Message-ID: <7528bcdd0606031453m59585ef9o711c96e5285e4b08@mail.gmail.com> On 6/3/06, francois schnell wrote: > > On 03/06/06, Paul D. Fernhout wrote: > > - Python resources (+ videos) > - all the educational Python softs possible (patapata, vpython, > Crunchy-Frog, rur-ple, "gnu-math", pyro, pygeo, pygame, pymol, etc ...) > - Pyhon and Python bindings apps to make contents with (Blender, Gimp, > etc) or to play games. > > In fact I'd like something I could show to people and say : all this > software are done either in Python or you can tinker them with Python > (bindings) and if you want to begin to discover/learn Python all you need > is the live CD and begin playing with all these. > > Concerning your java options, I don't know if you've seen the Logo TNG Gui > on OS-X : > http://education.mit.edu/starlogo-tng/tutorial-videos/ > Nice! This is obviously not the work of hobbyists. However, while the GUI is impressive, I am somewhat puzzled by their choice of angle measurement: 0 degree is "up" (i.e. y-axis in the traditional notation), 90 degrees is "right" (i.e. x-axis), etc. So, angles are increasing in the clockwise direction, starting from the y-axis. I wonder what their rationale is to use this non-conventional notation. It reminds me of the standard choice for the origin (top left) of screen image, with increasing y-coordinates going down, versus the standard mathematical choice for the origin (center ... or bottom left) with increasing y-coordinates going up. I'm not a big Java fan but if Java applets could help to bring patapata in a > browser with some python code background it could be important. > For Alan Kay the browser is something to reconsider: > http://www.redhat.com/archives/olpc-software/2006-April/msg00035.html > After reading Kay's post, I can say that Crunchy Frog appears to be heading in a similar way (fingers crossed) where you will be able to do turtle graphics. (And, hopefully, eventually ... embedded rur-ple :-) Who knows, one day, perhaps patapata will be supported in a browser using Crunchy Frog. (mostly Python with some javascript code and using the tag.) Andr? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060603/97a4131d/attachment.htm From andre.roberge at gmail.com Sun Jun 4 00:04:48 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Sat, 3 Jun 2006 19:04:48 -0300 Subject: [Edu-sig] Jython Poll: Java3D apps -- one click works or not? In-Reply-To: <44820418.8090805@kurtz-fernhout.com> References: <44820418.8090805@kurtz-fernhout.com> Message-ID: <7528bcdd0606031504m378911dbj93be273a5b2966e6@mail.gmail.com> On 6/3/06, Paul D. Fernhout wrote: > > I'm wondering how suitable Jython would be right now for easy-to-install > educational 3D apps in Python (e.g. PySqueak/PataPata, but could just as > well be any Python 3D app that runs under Jython). > > So, I would be curious, for those who care to try it, what percentage of > people on the edusig list who go to this Java 3D site, > https://j3d-webstart.dev.java.net/test/ > and click on one of the web start links, will actually see a 3D > application window open up on their system and run properly without much > effort? > > This is the simplest test (a rotating cube) so you could just click here: > http://download.java.net/media/java3d/webstart/test/HelloUniverse.jnlp > One click and you are done (in theory, if your machine has a JVM installed > and web start enabled). > > On my Debian GNU/Linux system, the first was a 4.6 MB download, after > accepting a couple of Verisign certificate from Sun for trusted code. Then > it just worked. After that, the other apps did not require much of a > download, and all just worked. However, I've done lots in the past related > to Jython and Java (including enabling web start for some tests), so my > system certainly is far from being a stock one. Works for me on Windows XP home edition. It's so nice and fast. I'm envious: I'd like Crunchy graphics to be able to be like this ... but they won't I'm afraid :-( So far, we have: > Debian/Gnome -- Yes > Mac OS X -- Yes > Debian/KDE -- No; No window > VMWare Windows 2000 under Debian -- No; Empty window. > > [snip] > > If you try it, please mention what OS you tried it on too (Mac OS X, Win > 2000, Debian GNU/Linux, etc.). Negative reports very much wanted too, so > if you try and it fails, please let us know. Having webstart disabled > maybe should count as a negative report, although I'd be curious the app > it did run after enabling and how hard the issue was to resolve. Andr? --Paul Fernhout > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060603/63f0ac0f/attachment.html From francois.schnell at gmail.com Sun Jun 4 00:41:22 2006 From: francois.schnell at gmail.com (francois schnell) Date: Sun, 4 Jun 2006 00:41:22 +0200 Subject: [Edu-sig] Jython Poll: Java3D apps -- one click works or not? In-Reply-To: <44820418.8090805@kurtz-fernhout.com> References: <44820418.8090805@kurtz-fernhout.com> Message-ID: <13a83ca10606031541q6ae3648djfd332bdacb8843e5@mail.gmail.com> On 03/06/06, Paul D. Fernhout wrote: > > > So, I would be curious, for those who care to try it, what percentage of > people on the edusig list who go to this Java 3D site, > https://j3d-webstart.dev.java.net/test/ > and click on one of the web start links, will actually see a 3D > application window open up on their system and run properly without much > effort? > > Wow, I like that ... Win XP SP 2 IE 6 : Ok Win XP SP 2 Firefox 1.5 : Ok Kubuntu Dapper Drake Konqueror 3.5.2 : Ok Kubuntu Dapper Drake Firefox 1.5 : Ok For Kubuntu I have the java plugin (sun-java5-plugin in multiverse repository). For " old classic 3D" with a java applet, Jmol have some examples of molecule manipulation and animations: http://jmol.sourceforge.net/demo/ francois -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060604/a5287a8a/attachment.htm From pdfernhout at kurtz-fernhout.com Sun Jun 4 01:03:39 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Sat, 03 Jun 2006 19:03:39 -0400 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> Message-ID: <4482154B.2070300@kurtz-fernhout.com> Francois- Thanks for the field report and links. So, just based on only these two comments (yours and Brad's), for GNU/Linux and recent Windows compatablity, pyGTK and Cairo are probably "works out of the box" experiences for most, but on Mac they are not. And 3D with pygtkglext is problematical on both Win and Mac (and I have not tried it either under Debian), so 3D that way sounds like a future thing at best. Live CDs sound great for the field (we had the earlier discussion about it on edusig a month or two back, including a link to a Python software distribution on a GNU/Linux bootable CD), http://wiki.python.org/moin/PythonCd though for individuals, like you say, they have to be motivated to make and boot a CD, more so than a simple download onto their current system. I read a few of the Alan Kay posts in that thread just now, and I think he is right on people not wanting to spread technology developed after the 1960s (and objects are a 1970s thing. :-). He sounds frustrated about it, but then so am I. :-) The site that he linked to was down, but the follow up reports suggested that some people had problems with the code there (JavaScript in a browser?), so even a browser based solution failed to deliver easy access to programming for people. No suprise with all the different versions of browsers out there (especially among people liable to try that demo). I personally have little interest trying to dumb something down to the browser level because I want to use things I make to write big systems, which would be hard in a browser, although I think it is none-the-less worth trying for others with different interest, like Johannes' Summer of Code project. I may have mentioned it here before, but one of my relatives who is a teacher had to sign a document saying she could be fired if they installed any software on her classroom computer. (The school district is worried about getting audited for copyright violations). But, presumabl, Java applets might be OK? I think the licensing issue and installation ease issue is a much bigger deal on the K-12 level than at the home or college level. One thing in the back of my mind since she told me that was some sort of dynamic application plus licensing information system where she could get her district to allow installation of a plugin or application which only allowed free software top be run on it. That way, they district is safe from lawsuits, and she has access to educational materials. It might be nice if some versions of PataPata or such could include that sort of capability -- only accepting applications digitally signed as being free to use (the opposite of must DRM software :-). Is edusig more composed of people on the college level, that we may not get too many K-12 educators chiming in on this? Or maybe it is not such a big problem outside the USA? See: "FREEZE! THIS IS A SOFTWARE RAID" http://www.businessweek.com/1997/09/b351634.htm and: "Guitar maker plays a Linux tune" http://www.infoworld.com/articles/hn/xml/02/11/27/021127hnerniball.html?s=IDGNS Can't find a school raid one off hand, but I know I have seen them before. Still, JavaScript is powerful and prototype-based, so something to keep thinking about. By the way, there is a JavaScript based interchange language Python binds to which I forget the name of which I had been thinking of using in PataPata instead of (unsafe) Python for data interchange (though I would prefer Python and a limited Python parser, say that only called a list of functions and classes, but people say wait for PyPy) -- if I could just remember what is was called. Thanks for the links. Got some ideas from Logo:TNG (I looked at two clips). Nice, and Squeak has something like it for some programming apps, but personally, I think (like Kirby?) that programming is more about language and text manipulation. Probably nothing wrong with introducing it as they do (nice idea of making statements like buttons), just that I would not want to maintain a complex application built that way. :-) So it falls in that category I mentioned in the elementary graphics thread of "making powerful tools easy to use for simple things vs. making it easy to do some simple things and that's it". Now, not having seen more of that system, it may well do very complex things (and I think the later Logos can). Some of this depends on the audience, I guess. On the other links, what's with these smart people from Finland? Now there is someplace that it sounds like you should go to drink the water. :-) Me, I'm sacrificing some sleep and it will catch up with me. [I have a consulting project that might be coming up so I want to get as much done as possible before that distracts me, in hopes it might pick up speed on its own afterwards if it reaches a "critical mass" point.] But nothing like an audience to get one motivated. I appreciate your interest, and hope at some point you might try the TK version in SVN -- though I have not packaged it, so you'd need to check it out with SVN (or download each of about twenty files separately, ouch). http://svn.sourceforge.net/viewcvs.cgi/patapata/trunk/PataPata/ I could make a package if that makes it a lot easier though. The inspector is now live in the world, and you can now save and load files with TK widgets. You can even delete the save and load buttons. :-) I'm trying to resolve a bug right now related to the prototype delegation; I've spent hours trying to trace what is probably some tiny mistake somewhere; it is related to copying a TK button and modifying the copy's click method and having the first buttons click method still called; so I haven't wanted to make a new released version with that problem. Anyway, I'd be curious to read your opinion on whether a TK version would hold your interest (or the interest of other educational people) given you mention somewhere on your site an interest in moving from tk to wx. If TK is good enough for you, I might keep developing with it for a while just to see how far it can go (hopefully to the point of a HyperCard like thing), since it is, for good or ill, the most cross-platform easy-install solution right now for Python GUIs and related graphics. Even wx takes an extra set of libraries. (I also think PataPata could make TK a little more approachable in some ways. :-) Then, with a little magic and tinkering, maybe a future Jython version could come along to make any future HyperCard-like PataPata stacks into applets? It really does not take that long to wrap the basic widgets of a system (a suprise for me, as I thought it would), and I already know Jython and Swing (my TK was very rusty). Anyway, I think a TK HyperCard-like system (and eventually raiding the PythonCard demos :-) that might be a nice next goal to aim for. Not as funky as pyGTK and Cairo and OpenGL, but something I could show ready progress on to some point of critical mass. However, if there are a predominance of "yes" responses to my other post about one click Java3D, I might think about moving to Jython and Swing. Even though two of my four tests failed, I think they failed due more to lack of OpenGL support on one machine than Java WebStart failing, which would mean a regular Jython Swing app might run correctly with one click more often than not. Anyway, for now, I am pushing along with TK as these issues percolate and I get feedback. Several things I need to do (e.g. making PataPata worlds talk to each other so you can have you app in one and the development tools in another) have little to do with the GUI anyway. All the best. --Paul Fernhout francois schnell wrote: > On 03/06/06, Paul D. Fernhout wrote: > Just for feedback, I've just installed PyGTK & GTK+ 2.8 runtime & > pyCairo on > a WinXP box and its really quick: 1 exe for each to double click on. > http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ > > The 3D gtkglext is more difficult for now (I didn't find any exe): => mingw > , make for win, etc ... > > Maybe for very *motivated* people (under win and mac-intel), a "heavy-gear" > possibility to be sure that most things are well set-up will be a > patapata-liveCD (maybe based on something like Morphix - that I might try > this summer). > > While checking this I've just found out that "pyro" made an apparently nice > live-CD (with knoppix) : > http://www.pyrorobotics.org/?page=PyroLiveCD > > Actually I think it would also be useful to have a ~ > "PythonWorldEdu-LiveCD" > with : > > - Python resources (+ videos) > - all the educational Python softs possible (patapata, vpython, > Crunchy-Frog, rur-ple, "gnu-math", pyro, pygeo, pygame, pymol, etc ...) > - Pyhon and Python bindings apps to make contents with (Blender, Gimp, etc) > or to play games. > > In fact I'd like something I could show to people and say : all this > software are done either in Python or you can tinker them with Python > (bindings) and if you want to begin to discover/learn Python all you need > is the live CD and begin playing with all these. > > Concerning your java options, I don't know if you've seen the Logo TNG Gui > on OS-X : > http://education.mit.edu/starlogo-tng/tutorial-videos/ > > I'm not a big Java fan but if Java applets could help to bring patapata > in a > browser with some python code background it could be important. > For Alan Kay the browser is something to reconsider: > http://www.redhat.com/archives/olpc-software/2006-April/msg00035.html > > > (And I would rather be modifying Jython than CPython, > >> since Java is somewhat easier to work with than C.) So, maybe I should >> think harder about a Jython/Swing version of PataPata (at least as >> another >> proof of concept)? > > > > Dear me I don't now were you find all this pluridisplinarity and energy ! > I don't know what you eat (or drink) in the morning but I want to order the > same ;) > > Concerning the different graphical/GUI choices I just don't now enough yet > to be useful but I'm following with interest your investigations. > Maybe, If after gathering feedback's you're not sure about the choices to > make, I tend to advise to go with the one you "feel" you will have the > more fun with :) > I'm quite convince of that after reading Pekka Himanen book (phD at 20 ...) > which have also an interesting intro of Torwald about the 3 > (survival,social, and fun) needs : > http://www.pekkahimanen.org/ > http://www.netvironments.org/ECulture/Module3/HackerEthic/ > > francois From francois.schnell at gmail.com Sun Jun 4 16:28:11 2006 From: francois.schnell at gmail.com (francois schnell) Date: Sun, 4 Jun 2006 16:28:11 +0200 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <4482154B.2070300@kurtz-fernhout.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> <4482154B.2070300@kurtz-fernhout.com> Message-ID: <13a83ca10606040728i789419e4o28f453fde2bc30df@mail.gmail.com> On 04/06/06, Paul D. Fernhout wrote: > > Francois- > > Live CDs sound great for the field (we had the earlier discussion about it > on edusig a month or two back, including a link to a Python software > distribution on a GNU/Linux bootable CD), > http://wiki.python.org/moin/PythonCd > though for individuals, like you say, they have to be motivated to make > and boot a CD, more so than a simple download onto their current system. Oops I missed that, they should add an "edu section", thanks I'll try it . I read a few of the Alan Kay posts in that thread just now, and I think he > is right on people not wanting to spread technology developed after the > 1960s (and objects are a 1970s thing. :-). He sounds frustrated about it, > but then so am I. :-) The site that he linked to was down, You're right the site isn't accessible for me neither. When I tried it a few weeks ago it worked well. I may have mentioned it here before, but one of my relatives who is a > teacher had to sign a document saying she could be fired if they installed > any software on her classroom computer. [...] "FREEZE! THIS IS A SOFTWARE RAID" > http://www.businessweek.com/1997/09/b351634.htm > and: > "Guitar maker plays a Linux tune" > > http://www.infoworld.com/articles/hn/xml/02/11/27/021127hnerniball.html?s=IDGNS > Can't find a school raid one off hand, but I know I have seen them before. Yes we have the same threats in French education and posters from the BSA everywhere in schools : http://francois.schnell.free.fr/bazar/exigez-loriginal.JPG http://swpat.ffii.org/gasnu/bsa/ Personally I hope they will even be more aggressive towards education, thanks to them it really helps to spread Free Software much quicker ! I heard Quebec ditched MS Office in secondary education for Open Office because of these threats. Other countries like Spain and Brazil are now massively going for Linux in secondary education. Me, I'm sacrificing some sleep and it will catch up with me. [I have a > consulting project that might be coming up so I want to get as much done > as possible before that distracts me, in hopes it might pick up speed on > its own afterwards if it reaches a "critical mass" point.] Still take care of yourself ! undefined day you should ... time.sleep (7*60*60) But nothing like an audience to get one motivated. I appreciate your > interest, and hope at some point you might try the TK version in SVN -- > though I have not packaged it, so you'd need to check it out with SVN (or > download each of about twenty files separately, ouch). > http://svn.sourceforge.net/viewcvs.cgi/patapata/trunk/PataPata/ > I could make a package if that makes it a lot easier though. Don't worry about the package I've actually co the repository a day ago (on my XP and Kubuntu box) and will check for updates often to have my current juicy PataPata version :) Here's the problem I have with the Tk version: On Win XP : - If I alt-right-click on a Morph and call the inspector it doesn't work (ie I can see in the dos window that it called InspectMorph but the inspector doesn't focus on this Morph) - If I manually search for a morph in the Inspector (where it says "morphs <'type list'>") and if I try to change its color for example (lets say 'red') and click "accept" => the morph disappear from the world and the dos window says : problem drawing morph On Kubuntu Dapper Drake: - the alt (left or right) click doesn't work as expected : if I want to drag a morph I'm always dragging the whole application window and I can't drag an individual Moph anymore. If do an alt-right click I can't access the menu to inspect the morph (I have a ~"resize" icon for the mouse cursor). - I have the same bug than for XP if I want to change a value in the inspector. Maybe it is related to the bug you were talking about ? I can make a quick screencast if it helps you to visualize the problem. francois > > > All the best. > > --Paul Fernhout > > francois schnell wrote: > > On 03/06/06, Paul D. Fernhout wrote: > > Just for feedback, I've just installed PyGTK & GTK+ 2.8 runtime & > > pyCairo on > > a WinXP box and its really quick: 1 exe for each to double click on. > > http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ > > > > The 3D gtkglext is more difficult for now (I didn't find any exe): => > mingw > > , make for win, etc ... > > > > Maybe for very *motivated* people (under win and mac-intel), a > "heavy-gear" > > possibility to be sure that most things are well set-up will be a > > patapata-liveCD (maybe based on something like Morphix - that I might > try > > this summer). > > > > While checking this I've just found out that "pyro" made an apparently > nice > > live-CD (with knoppix) : > > http://www.pyrorobotics.org/?page=PyroLiveCD > > > > Actually I think it would also be useful to have a ~ > > "PythonWorldEdu-LiveCD" > > with : > > > > - Python resources (+ videos) > > - all the educational Python softs possible (patapata, vpython, > > Crunchy-Frog, rur-ple, "gnu-math", pyro, pygeo, pygame, pymol, etc ...) > > - Pyhon and Python bindings apps to make contents with (Blender, Gimp, > etc) > > or to play games. > > > > In fact I'd like something I could show to people and say : all this > > software are done either in Python or you can tinker them with Python > > (bindings) and if you want to begin to discover/learn Python all you > need > > is the live CD and begin playing with all these. > > > > Concerning your java options, I don't know if you've seen the Logo TNG > Gui > > on OS-X : > > http://education.mit.edu/starlogo-tng/tutorial-videos/ > > > > I'm not a big Java fan but if Java applets could help to bring patapata > > in a > > browser with some python code background it could be important. > > For Alan Kay the browser is something to reconsider: > > http://www.redhat.com/archives/olpc-software/2006-April/msg00035.html > > > > > > (And I would rather be modifying Jython than CPython, > > > >> since Java is somewhat easier to work with than C.) So, maybe I should > >> think harder about a Jython/Swing version of PataPata (at least as > >> another > >> proof of concept)? > > > > > > > > Dear me I don't now were you find all this pluridisplinarity and energy > ! > > I don't know what you eat (or drink) in the morning but I want to order > the > > same ;) > > > > Concerning the different graphical/GUI choices I just don't now enough > yet > > to be useful but I'm following with interest your investigations. > > Maybe, If after gathering feedback's you're not sure about the choices > to > > make, I tend to advise to go with the one you "feel" you will have the > > more fun with :) > > I'm quite convince of that after reading Pekka Himanen book (phD at 20 > ...) > > which have also an interesting intro of Torwald about the 3 > > (survival,social, and fun) needs : > > http://www.pekkahimanen.org/ > > http://www.netvironments.org/ECulture/Module3/HackerEthic/ > > > > francois > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060604/f469bbe5/attachment.html From pdfernhout at kurtz-fernhout.com Sun Jun 4 23:34:01 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Sun, 04 Jun 2006 17:34:01 -0400 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <13a83ca10606040728i789419e4o28f453fde2bc30df@mail.gmail.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> <4482154B.2070300@kurtz-fernhout.com> <13a83ca10606040728i789419e4o28f453fde2bc30df@mail.gmail.com> Message-ID: <448351C9.6060306@kurtz-fernhout.com> francois schnell wrote: > Still take care of yourself ! undefined day you should ... time.sleep > (7*60*60) Well, after a good night's sleep, the bug I've spent endless time chasing, scouring all the delegation code in Prototypes.py for perhaps ten or so hours on and off, turned out to be a problem in the GUI code from all the way back to the wx code I copied for tk (which it turns out had the same problem). So nothing wrong with the delegation code (though I did optimize it some, and add a debugging flag during all the hair pulling. :-). Avoiding these kind of mistakes is just the reason "pair programming" is surprisingly cost effective. http://www.pairprogramming.com/ From there: "One programmer, the driver, has control of the keyboard/mouse and actively implements the program. The other programmer, the observer, continuously observes the work of the driver to identify tactical (syntactic, spelling, etc.) defects and also thinks strategically about the direction of the work." Someone looking over my shoulder when I wrote the original code might have noticed that and saved me lots of debugging. Need to add support for doing that virtually over the net with PataPata someday. :-) It's amazing how much even a novice programmer can contribute to an expert's productivity by just noticing something like that and asking a question about it while the code is being first written. For those who are curious, or to mildly challenge your students, here is the offending piece of code (though most of the problem was knowing where to look, of course. :-): def duplicateMorph(self, morph): newMorph = morph.copy() self.addMorph(newMorph) newMorph.x += 5 newMorph.y += 5 if morph.getPropertyDefinition("createEmbeddedWidget"): morph.createEmbeddedWidget() World.duplicateMorph = duplicateMorph As the Monty Python team might say, "Can you spot the loony [bug]?" :-) ============================ ==== If you need a hint: === ============================ If I had done a better job of naming the input variable to "originalMorph" this would have been a more obvious problem. Solution below: (*) I also corrected the wx version, which used the identical code, which I had copied to the tk version. > Don't worry about the package I've actually co the repository a day ago (on > my XP and Kubuntu box) and will check for updates often to have my current > juicy PataPata version :) Great. :-) > Here's the problem I have with the Tk version: > > On Win XP : > > - If I alt-right-click on a Morph and call the inspector it doesn't work > (ie > I can see in the dos window that it called InspectMorph > but the inspector doesn't focus on this Morph) > - If I manually search for a morph in the Inspector (where it says "morphs > <'type list'>") and if I try to change its color for example (lets say > 'red') and click "accept" => the morph disappear from the world and the dos > window says : problem drawing morph > > On Kubuntu Dapper Drake: > > - the alt (left or right) click doesn't work as expected : if I want to > drag a morph I'm always dragging the whole application window and I can't > drag an individual Moph anymore. If do an alt-right click I can't access > the > menu to inspect the morph (I have a ~"resize" icon for the mouse cursor). > - I have the same bug than for XP if I want to change a value in the > inspector. > > Maybe it is related to the bug you were talking about ? I can make a quick > screencast if it helps you to visualize the problem. Sorry about those difficulties. You've kept me busy for the afternoon. :-) Probably no need for a screencast for these issues, but I'd love to see one for TK once things are working well for you. First, so it works at all (even with smoke coming out :-)? That was my first concern, and implicitly I think that is answered by "yes". :-) Hooray! For the the inspector tree updating, that was simply not finished. I had known about this, but I has just had not got around to fixing it. I have now fixed it and it is in the latest SVN. Should work for all platforms. The non-widget morph disappearing and generating a drawing error message is most likely a problem with validation of whatever was entered for the color field. If TK can't interpret the color value of the widget, it can't draw it. I can't be certain that is the problem, but I think that is the most likely cause because I have seen it happen myself (like if I put in "blue" instead of "blue"). There is a color selector dialog now used under TK, though you need the world menu. In testing this just now, I'm finding the TK multi-line edit is adding an extra newline. I think this is a known TK issue, so I just now changed the code in SVN to strip that out, otherwise this will never work from the inspector? You can also use a new right click menu option of "edit value" which gives you a popup single line editor where you can enter "blue" and no newline is appended for sure. Please let me know if that problem persists after the latest SVN, in case it was from something else. I just added a way to validate (or otherwise alter) any changes to properties, using a "callBeforeSetFunction" defined in a property for a prototype, but I have not tested it. :-) Also, I do not know what are valid TK color options or how to determine this. [There is also another bug with setting colors if you use the color setting dialog and save the world, when it reads it in there will be an error and a loss of the color, though the world should still load properly otherwise and the inherited color will be used.] Alt clicking is problematical under Linux because the default (for Gnome?) seems to be that alt click will drag the window in the window manager. I'm thinking the dragging or resize curso behavior might be due to this. Under Gnome, you can change Window manager preferences so that ALT does not drag windows (choose the "Windows" key instead). The reason I picked "Alt" where I would rather have picked "Ctrl" is that Ctrl-click is used for multi-select in lists commonly, which I think is a common thing to want to do. I don't know of a common use for ALT (but maybe there is?). I don't have a good answer for this (other than changing the window manager preferences), although in response to this I just added support for setting the Meta key selection by uncommenting something in "options.py" so you could use Ctrl-click easily if you wanted to after editign that file. Still, I don't like making such a core part of the GUI changeable in terms of leading to confusion, so I don't know if this should stay). Another alternative would be to use Ctrl in all widgets except lists? Though that might be confusing in its own right. Maybe you or someone else can think of a better approach to this? Please me know if these workarounds don't work for you. By the way, I moved the choice of GUI to "options.py" as well. wx should still work. If everything seems OK with you with these fixes, I think I will soon bump the version number up to 1.1 and make another file release. The last really annoying thing I know of is that sometimes when you drop a widget it continues to drag; that needs more work first though; hopefully it is not a fundamental tk problem. I'll be curious if that is GNU/Linux only? Also, there is flicker in the TreeWidget from how it is used, but I think that is livable (I can't find an easy way to freeze it for a while like I did under wx). And drawn morphs are always below widget morphs but can sometimes be dragged if they are above them in the world morph list -- not sure what to do about that, other than get rid of the drawn morphs and make them draw in widget frames with a canvas (the likely solution). There is also no way to raise and lower morphs. Or the biggy new thing needed for HyperCard-like functionality, compositing morphs (or at least, nesting them). Lots more to do, but probably OK to put those off for the next release. Thanks for your fortitude for living on the "bleeding edge" of technology, and I appreciate your continued interest and comments with the jump to TK. I now it's been a bumpy ride switching widgets toolkits, and I tried to do it fast to keep momentum moving on this project. I'm hoping that once the system is working well with TK it should be more malleable for more Python programmers. --Paul Fernhout (*) To understand the bug, renaming the input variable from "morph" to "originalMorph" should make the problem more obvious: def duplicateMorph(self, originalMorph): newMorph = originalMorph.copy() self.addMorph(newMorph) newMorph.x += 5 newMorph.y += 5 if originalMorph.getPropertyDefinition("createEmbeddedWidget"): originalMorph.createEmbeddedWidget() World.duplicateMorph = duplicateMorph That shows how the code used the original "morph" instead of "newMorph" to instantiate the new native widget, thus resultign in hooking up, say, a new native button to the old button's Morph prototype. So the the new Morph would never receive click events from the new native button, as they would go to the old Morph prototype directly. All the time I assumed it was some instead a problem with the delegation code. So the corrected code, both that works and that is clearer. def duplicateMorph(self, originalMorph): newMorph = originalMorph.copy() self.addMorph(newMorph) newMorph.x += 5 newMorph.y += 5 if newMorph.getPropertyDefinition("createEmbeddedWidget"): newMorph.createEmbeddedWidget() World.duplicateMorph = duplicateMorph A tip off to me should have been that the new morph was not offset by 5 pixels in X and Y as with the drawn widgets. I had noticed that, but thought I'd look into that problem later. It was only when I started thinking about that anomaly instead that I found this bug. I am now thinking that had I looked harder at the newMorph, I might also have noticed that the widget field was presumably still None. From francois.schnell at gmail.com Mon Jun 5 02:38:50 2006 From: francois.schnell at gmail.com (francois schnell) Date: Mon, 5 Jun 2006 02:38:50 +0200 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <448351C9.6060306@kurtz-fernhout.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> <4482154B.2070300@kurtz-fernhout.com> <13a83ca10606040728i789419e4o28f453fde2bc30df@mail.gmail.com> <448351C9.6060306@kurtz-fernhout.com> Message-ID: <13a83ca10606041738n50b9ed47r3a9a34b73f47cc6@mail.gmail.com> On 04/06/06, Paul D. Fernhout wrote: > > > Alt clicking is problematical under Linux because the default (for Gnome?) > seems to be that alt click will drag the window in the window manager. D'oh ! I should have thought of that. I was on KDE (Kubuntu is an Ubuntu distro which is KDE centric).I've just changed the "Alt" in "System Settings > Desktop > Window Behavior" and now its fine :) I'll test later on Gnome and XFCE. If everything seems OK with you with these fixes, I think I will soon bump > the version number up to 1.1 and make another file release. Maybe you could go for a little smaller frame than 850 in height : on a 1024*768 setting I can't catch the the "save button" and it wil help me for screencasts :) BTW I just love now the fact that I can drag and reorganize completely all the elements of the interface (buttons, inspector) in term of position, size, etc. Cool. The last > really annoying thing I know of is that sometimes when you drop a widget > it continues to drag; I didn't saw that yet but sometimes (rarely) on Win & LInux, if I alt-click & drag a widget/morph quickly and then if I stop pushing the alt-key and continue to move the mouse away the morph drop but if I press the alt key again in the world the morph go to the new position of the mouse. This is not a big problem (at least for me). Also, there is flicker in the TreeWidget from how it is used, but I think > that is livable (I can't find an easy way to freeze it for a while like I > did under wx). I think its fine I don't find it disturbing. On the other-hand on WinOS if I right-alt-click on a morph I need to engage in the menu and "quickly" stop pressing the alt-key (otherwise the menu is flickering and its difficult to choose an entry of the menu). When you know it after its fine. Lots more to do, but probably OK to put those off for the next release. Yes, sure :) . > I now it's been a bumpy ride switching widgets toolkits, and I tried to do > it fast to keep momentum moving on this project. I like bumpy rides, flat and straight roads are boring ... I'm hoping that once the > system is working well with TK it should be more malleable for more Python > programmers. I hope too, BTW I could maybe present your work in the Python section of the Libre Software Meeting in July in France if you're OK with that and if you feel it's not too soon. It's a kind of "big bazaar" in a French University and there's a Python section too organised by the French Python User Group (AFPY). I could apply for a small presentation (there maybe won't be a lot of people since there are lots of // tracks in this meeting but it could interest some python users/developers). http://www.rmll.info/?lang=en BTW I can now also change values and method without any problems with your new version. Well done, time to sleep on this part of the globe, time.sleep(7*60*60) :) francois --Paul Fernhout > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060605/eeb88a3d/attachment.html From pdfernhout at kurtz-fernhout.com Mon Jun 5 19:34:04 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Mon, 05 Jun 2006 13:34:04 -0400 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <13a83ca10606041738n50b9ed47r3a9a34b73f47cc6@mail.gmail.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> <4482154B.2070300@kurtz-fernhout.com> <13a83ca10606040728i789419e4o28f453fde2bc30df@mail.gmail.com> <448351C9.6060306@kurtz-fernhout.com> <13a83ca10606041738n50b9ed47r3a9a34b73f47cc6@mail.gmail.com> Message-ID: <44846B0C.5040807@kurtz-fernhout.com> francois schnell wrote: > Maybe you could go for a little smaller frame than 850 in height : on a > 1024*768 setting I can't catch the the "save button" and it wil help me for > screencasts :) Good idea. I shrunk the example to 800x600, and repositioned and shrunk some widgets to make that all fit, so as to make screencasts / screenshots of the example world easier. The changes are in SVN. If you need space to work, you can always enlarge the window after it is running. Anything to help keep those great screencasts coming. :-) > BTW I just love now the fact that I can drag and reorganize completely all > the elements of the interface (buttons, inspector) in term of position, > size, etc. Cool. Glad you like it. That is the ultimate promise of the system. At this point, in theory, you should be able to bootstrap it completely using just itself. In practice, I find myself still editing the original source files for now. I'm not sure at what point I would make the switch over. I have a feeling I have to think more deeply about issues related to multiple worlds sharing code, and also a difference between application code prototypes and library code prototypes, perhaps with a writer that doesn't write out library prototypes but puts a reference to them and the version of the library to load from when the world reloads. Still, you can now "shoot yourself in the foot" by deleting the inspector widgets (or doing a "clear"). What I want to have is worlds talking to worlds, so your inspector can be in another world, where it is not operating on itself (you could then have another inspector operating on it in another world of course, recursively). I've just been reading about the TK "Send" command, which allows you to execute arbitrary TCL code in another TCL/TK application running in the same X session. That sounds like what I wanted to do with PataPata in terms of having worlds send Python code to each other. I had been worried about the security issues and wanting to have a Python sandbox for such code, but if TCL/TK has been doing this for more than a decade (with me reinventing this wheel :-) then it seems like doing that with Python should be acceptable as long as I do some minimal security equivalent to what TCL/TK does. [Which also means that all Python Tkinter apps may have been accepting this risk already for a very long time, too.] I could perhaps use the TCL "send" facility to get started; I need to look into that, though I read somewhere the TCL/TK Win32 may not support Send, it seems, so if that is true I definitely want something that does. Still lots to think about and do there. > I didn't saw that yet but sometimes (rarely) on Win & LInux, if I > alt-click & drag a widget/morph quickly and then if I stop pushing the > alt-key and continue to move the mouse away the morph drop but if I press > the alt key again in the world the morph go to the new position of the > mouse. > This is not a big problem (at least for me). Yes, that's the sort of thing, generally with fast drags, and I suspect it may have something to do with dragging widgets over or under other widgets at the same time. Not sure exactly where the problem is. I suspect it is in TK not processing some events fast enough somehow and perhaps even dropping events. I need to look more at this. One thing I have been thinking of, which might help with the TK events, is switching to a drag model where a drag starts when you press the ALT key down (not the mouse button), so to drag you would mouse over to a widget, press the ALT key, watch the widget move while dragging, and then let go of the ALT key when you were done. I'm hoping to code that up and see how it feels, and if it as a byproduct solves the problem. It may introduce another problem though -- if you press the ALT key at any other time when using the system (say by mistake) your widgets might move. I'll have to see if that is a serious problem in practice. Anyway, not certain I will do that, but just one approach. And not sure it will map to all platforms either. > On the other-hand on WinOS if I right-alt-click on a morph I need to > engage in the menu and "quickly" stop pressing the alt-key (otherwise the > menu is flickering and its difficult to choose an entry of the menu). When > you know it after its fine. Hmmm, need to think about that. Clearly that is awkward. I wonder how other widget editors cope with that. Originally, in an earlier proof of concept I had a right click menu (without requiring ALT) which joined together the widget options and the world options. (I could have made a cascading menu for the world options at the top, I guess). I'm reluctant to abandon the "ALT" difference for menus, but I could consider going back to that old approach. But if I do, then any common widget that puts up its own menu using native calls might not have access to the world menu (unless it explicitly does something). On the other hand, not many native widgets use menus out-of-the box I think (probably there are some fancy complex widgets, like graphs with their own internal menus). It seems like in using native widgets,there simply will need to be some compromises somewhere. > BTW I could maybe present your work in the Python section of > the > Libre Software Meeting in July in France if you're OK with that and if you > feel it's not too soon. > > It's a kind of "big bazaar" in a French University and there's a Python > section too organised by the French Python User Group (AFPY). I could apply > for a small presentation (there maybe won't be a lot of people since there > are lots of // tracks in this meeting but it could interest some python > users/developers). > http://www.rmll.info/?lang=en That would be fantastic. I'm still a little nervous PataPata is not finished or polished enough to have too many users right now. You've been tolerant of the bumpy ride (thanks); most people probably would not be. But maybe if you presented PataPata/PySqueak as an experimental work in progress? Or just a fun thing to try to see what is possible in Python using a prototype-programming paradigm? As opposed to presenting it as a finished work to use to build the next great misson-critical application. :-) Anyway, I don't want to discourage you from presenting on it. I think that would be great, and a few more interested people trying it on different platforms, say the Mac or FreeBSD, would be wonderful. And if a few of them wanted to build something on top of it or make improvements to the core, that would be great. I'm just trying to encourage you to keep the audience's expectations low for now, both because it is a work-in-progress and also mostly because I don't have the time myself to provide technical support to more than a handful of users right now. :-) Still, everything is in sourceforge, so there is lots of potential for collaboration there, including others taking it in new unexpected directions. === possible future directions === I think if I could have a Jython version where you could do a one click on a web site and get a Python/Jython PataPata prototype development environment runnign on your system, then that might be something realy worth reporting. :-) I was encouraged by the fact that when you and Andre tried it, the Java Webstart system worked as advertised and even gave you 3D images (if you have Java installed and OpenGL drivers properly configured). But adding such an extra platform also entails a bit more thinking and refactoring related to abstracting out cross-platform issues. That is the opposite of the advice I gave Johannes about committing to pyCairo in the "elementary graphics" thread, I know, :-) but I think a specific graphics library choice is easier to insist on then to insist on a single choice of an event driven widget set choice. For example, I would expect pyCairo probably doesn't require X11 be installed on the Mac. Here are pyCairo's Mac dependencies, by the way, but I am not sure what in practice that means for installation difficulties of a binary package? http://www.hmug.org/pub/MacOS_X/BSD/Development/Languages/python/pycairo/ I'm still tempted to make pyCairo an important part of PataPata down the road, but likely without a GTK requirement (since I think Brad has a good point on GTK issues for the Mac for now), especially if any Mac users chime in on the feasibility of an easy installation for just that part. It sounds like, from your report, and my experience, that using just pyCairo under Wind or GNU/Linux requires just a fairly easy install. Anyway, the widget sets were surprising easy to hook up, at least for the basics, so it seems to me that it might be possible, without too much trouble, to have cross-platform support for wx, tk, Jython/Swing, GTK, and Cocoa/Mac, at least as far as the basics of handling a button which clicks, a text field that you can get the current value, popup message boxes, and so on, which might then be enough to make simple cross-platform HyperCard like stacks. Obviously, people might want to do native things with the particular widget set they choose to use, but providing at least some simple cross-platform support for the most common things might making porting easier later. So, as I write this, I find myself, at some reluctance, following the "worser is Better" philosophy of design: http://www.jwz.org/doc/worse-is-better.html "The lesson to be learned from this is that it is often undesirable to go for the right thing first. It is better to get half of the right thing available so that it spreads like a virus. Once people are hooked on it, take the time to improve it to 90% of the right thing." :-) > BTW I can now also change values and method without any problems with your > new version. Thanks for the feedback that that part works. I'm thinking the original issue was from the tk text-entry extra newline issue, which I worked around. --Paul Fernhout From pdfernhout at kurtz-fernhout.com Mon Jun 5 23:08:00 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Mon, 05 Jun 2006 17:08:00 -0400 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <44846B0C.5040807@kurtz-fernhout.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> <4482154B.2070300@kurtz-fernhout.com> <13a83ca10606040728i789419e4o28f453fde2bc30df@mail.gmail.com> <448351C9.6060306@kurtz-fernhout.com> <13a83ca10606041738n50b9ed47r3a9a34b73f47cc6@mail.gmail.com> <44846B0C.5040807@kurtz-fernhout.com> Message-ID: <44849D30.7000701@kurtz-fernhout.com> Just as an update, I've released a 1.10 version of PataPata at: http://sourceforge.net/project/showfiles.php?group_id=165910 As a recap of what is new relative to the previous version, there is now a TK version in addition to the wxWidgets version. The TK version has the inspector and other controls live in the world (so the inspector can inspect and modify itself, you can "shoot yourself in the foot" by deleting the file "open..." and "save..." buttons or the inspector edit field, etc.). One recent change related to the flicker and dragging problem discussed here is that the TK version no longer updates the inspector when you click on a morph. You have to ALT-right-click to bring up the menu and pick the first item which says "inspect morph". That solved both most of the flicker issue (still a little) and, more importantly, the dragging bug (where a widget kept tracking the mouse after you let go of it). This is little less convenient in some ways, but I'll see how people take to it. The interface feels a little less "hyper" now (in a good way). :-) No solution yet for the ALT-right-click menu flicker issue under windows. I did try to do just ALT-dragging to move morphs under TK (without a need for a mouse click), but gave up on it for now as I ran into a few issues. It turns out you need to click first in the frame to get TK to listen for keys. So, if you are just mousing over the window, and press ALT, it might in some cases not work. Also, frustratingly, the canvas (as opposed to a frame) seemed to ignore key events for some reason despite my trying lots of variations (you would think that would be resolvable, but with the first issue making me wonder if it was a good idea, I did not pursue that at great length). Still lots of stuff to do. --Paul Fernhout Paul D. Fernhout wrote: > francois schnell wrote: >>I didn't saw that yet but sometimes (rarely) on Win & LInux, if I >>alt-click & drag a widget/morph quickly and then if I stop pushing the >>alt-key and continue to move the mouse away the morph drop but if I press >>the alt key again in the world the morph go to the new position of the >>mouse. >>This is not a big problem (at least for me). > > > Yes, that's the sort of thing, generally with fast drags, and I suspect it > may have something to do with dragging widgets over or under other widgets > at the same time. Not sure exactly where the problem is. I suspect it is > in TK not processing some events fast enough somehow and perhaps even > dropping events. I need to look more at this. One thing I have been > thinking of, which might help with the TK events, is switching to a drag > model where a drag starts when you press the ALT key down (not the mouse > button), so to drag you would mouse over to a widget, press the ALT key, > watch the widget move while dragging, and then let go of the ALT key when > you were done. I'm hoping to code that up and see how it feels, and if it > as a byproduct solves the problem. It may introduce another problem though > -- if you press the ALT key at any other time when using the system (say > by mistake) your widgets might move. I'll have to see if that is a serious > problem in practice. Anyway, not certain I will do that, but just one > approach. And not sure it will map to all platforms either. > > >>On the other-hand on WinOS if I right-alt-click on a morph I need to >>engage in the menu and "quickly" stop pressing the alt-key (otherwise the >>menu is flickering and its difficult to choose an entry of the menu). When >>you know it after its fine. > > > Hmmm, need to think about that. Clearly that is awkward. I wonder how > other widget editors cope with that. Originally, in an earlier proof of > concept I had a right click menu (without requiring ALT) which joined > together the widget options and the world options. (I could have made a > cascading menu for the world options at the top, I guess). I'm reluctant > to abandon the "ALT" difference for menus, but I could consider going back > to that old approach. But if I do, then any common widget that puts up its > own menu using native calls might not have access to the world menu > (unless it explicitly does something). On the other hand, not many native > widgets use menus out-of-the box I think (probably there are some fancy > complex widgets, like graphs with their own internal menus). It seems like > in using native widgets,there simply will need to be some compromises > somewhere. From kirby.urner at gmail.com Mon Jun 5 23:07:47 2006 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 5 Jun 2006 14:07:47 -0700 Subject: [Edu-sig] More Autobio and Pythonic Mathematics Message-ID: When visiting the Royal Kingdom (Druk-yul) one time, I was invited to submit an article to the national paper, Kuensel, http://www.kuenselonline.com/. I was a young guy, and so was the editor, Bhutanese with a degree in journalism from Columbia, his wife a native Singaporean. I was originally on a mission to deliver new fonts (Tibetan, from some Indian shop), only to discover the far-advanced inhouse project to turn the native Dzongkha (a government language) into a Mac typeface. So my contribution was not needed on that front. But I found other ways to contribute e.g. teaching dBase at the computer center, and working on a telex billing system for RICB. In that published newspaper article, I wrote about the need for what would become part of a more integrated security system, i.e. a computer deliberately set aside as "first recipient" of any potentially hostile software. I called it the Quarantine Computer. In today's world, it'd have much in common with a DMZ (this was the early 1980s). In those days software was freely passed around all over Asia, but often with nefarious viruses infused, one might almost think deliberately, by the vindictive proprietors having given up enforcing their copyrights, but still seeking their revenge against pirates. Of course nowadays everything is different: the better software encourages you to copy it, and having the source code available means more accountability, not less. If someone put in an illicit trap door or security hole in the code people use, we've got a better chance of detecting that fact, and running an audit, than if all we're given are binaries (relatively opaque). That's the thing about open source: it's the native impulse of a security-conscious conservative, paid to be paranoid, to maybe eyeball source code ahead of time (or at least verify it's accessible), then to throw it on some throwaway box, easier to reformat than devirus, before diffusing some new application throughout the corporate intranet. Closed source is inherently less trustworthy, precisely because you're not supposed to see how it does what it does. But another way to frustrate this engineering impulse to self-protect, is to make sure "source code" though accessible, is obscure and not easily readable (sound familiar?). Python is resisted in some quarters simply because it's less cryptic, easier to eyeball, than many of its competitors. And lets face it, some have business plans that really do depend on obfuscation, pulling wool over other peoples' eyes. To such people, Python might be a threat, simply because so many people are getting to know Python and will be able to spot any deliberately and/or carelessly flawed code. Pythonic mathematics serves two agendas: (1) keep new generations math-literate, so that they'll have the core concepts needed to develop a reading knowledge of several technical disciplines and (2) preserve and spread this "new kind of literacy" associated with computer programming and source code -- because of the important socio-political freedoms which hinge upon remaining vigilant against opportunistic and/or parasitic feeders upon those innocent of these skills. We want our students to be more self-sufficient when it comes to tackling technology. The status quo curriculum renders too many too helpless around the power tools of our day, and therefore too at the mercy of so-called experts. Pythonic Mathematics aims to broadly democratize and empower, not to put vital analytical tools in just a few hands, however well-meaning these hands may be. Kirby From kirby.urner at gmail.com Mon Jun 5 23:08:42 2006 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 5 Jun 2006 14:08:42 -0700 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <44849D30.7000701@kurtz-fernhout.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> <4482154B.2070300@kurtz-fernhout.com> <13a83ca10606040728i789419e4o28f453fde2bc30df@mail.gmail.com> <448351C9.6060306@kurtz-fernhout.com> <13a83ca10606041738n50b9ed47r3a9a34b73f47cc6@mail.gmail.com> <44846B0C.5040807@kurtz-fernhout.com> <44849D30.7000701@kurtz-fernhout.com> Message-ID: On 6/5/06, Paul D. Fernhout wrote: > Still lots of stuff to do. > > --Paul Fernhout > Besides write these posts to edu-sig? When do you ever find the time :-D. Kirby From pdfernhout at kurtz-fernhout.com Tue Jun 6 03:45:28 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Mon, 05 Jun 2006 21:45:28 -0400 Subject: [Edu-sig] Accessibility to non CS types? In-Reply-To: References: <44775EFB.6070606@kurtz-fernhout.com> <13a83ca10605281500h67954015w85cd3f3b4cbca2f1@mail.gmail.com> <447B30F2.60806@kurtz-fernhout.com> <13a83ca10605291548k2619608bx5a4a42a5a1922c32@mail.gmail.com> <447E8064.3090900@kurtz-fernhout.com> Message-ID: <4484DE38.8020500@kurtz-fernhout.com> kirby urner wrote: > I also admire many of the constructivists you mention. [snip] Wow, you sure get around, Kirby! :-) By the way, in my post on sources, I forgot to mention "Doug Engelbart", of course. His "mother of all demos" is still driving much of computing R&D today (including, perhaps, a lot of Alan Kay's work). You can see the original demo at: http://sloan.stanford.edu/mousesite/1968Demo.html Even if you don't want to watch the entire 90 minutes, there is a textual description there of what is presented. Perhaps making computers "accessible" to non CS types should involve teaching them more of the history of computing, i.e. how far we have *not* come. :-) If one taught that, one would want to include Alan Kay's comments (linked by Francois in another thread) http://www.redhat.com/archives/olpc-software/2006-April/msg00035.html on how hardly anybody wants to use post 1960s language ideas. :-) (Although, even in the 1960s, there was Lisp with first class functions, which mainstream Java still lacks. :-) While I'd rather have my three screen Debian GNU/Linux box and internet of today than his specific 1960s technology, clearly what Doug Engelbart's team demonstrated was such a quantum leap from what went before(*) that it really is barely matched in some ways by today's consumer systems, at least in spirit almost forty years later -- as around 1968 he demonstrated real-time collaborative audio and video conferencing and editing over a network, a dynamic extendable language, hypertext, graphics, the mouse, a chord keyboard, and so on. Have we really come that much further in four decades conceptually? In terms of chord keyboard use, for example, we're still behind his demo (his argument was learning to chord keys was a good investment for a professional, as beyond the improved speed, you could also mouse with one hand and chord text with the other). I did try to get Doug's newer effort to consider doing the next version in Python (as part of his "Unfinished Revolution II" Stanford course), as well as try to hook them up with the Zope people directly, but I had trouble prying them away from the grip of Sun's Java. :-) See for example: http://www.bootstrap.org/dkr/discussion/0215.html (I have long since taken down the experimental Zope site linked there, though.) Note: while I thought using Java six years ago was not a very good idea because at that time, beyond the language's clutter and limitations, the JVM was also an unstable "write once, debug everywhere" solution with limited libraries, now, six years later, while I still think Java remains a problematical language syntactically, I think the JVM itself is a reasonable deployment vehicle in many situations (i.e. for Jython applications) and the Java libraries themselves have finally gotten most of the bugs out and there are some fairly good free versions of JVMs (e.g. Kaffe) and supporting libraries (e.g. GNU Classpath). --Paul Fernhout P.S. I should also mentioned Neil Postman and Charles Weingartner, from their late 1960s book: http://www.amazon.com/exec/obidos/tg/detail/-/0385290098?v=glance P.P.S. (*) well, this is ignoring Ivan Sutherland's work on Sketchpad, http://en.wikipedia.org/wiki/Ivan_Sutherland or Vannevar Bush's Memex concept, http://en.wikipedia.org/wiki/Memex which both informed Doug Engelbert & colleagues' work (and which J.R. Licklider funded, and even relates to Theodore Sturgeon's 1950s writings). Vannevar Bush's 1940s Memex idea really seems like the origin of many of these ideas. http://www.theatlantic.com/doc/194507/bush By the way, here is a Python version of a Memex-like system I wrote a while back (included in a larger Python package): http://sourceforge.net/project/showfiles.php?group_id=6010 The implementation is in the included sample file "tkPointrelMemex.py". It is mentioned by me here with some usability tips: http://hardware.slashdot.org/article.pl?sid=05/07/19/2330201&threshold=1&tid=126&tid=198&tid=185&tid=103 Oh, and that article reminds me I did a Jython version of Memex too, see: http://pointrel.org/projects/memex/ which has a screen shot and links to the code here: http://pointrel.org/projects/memex/memex.py I guess I'm kind of working my way through the history of computing with Python. :-) First Memex, now sort-of a nod towards Smalltalk (and Self) with PataPata, and then maybe, someday, Augment. :-) From pdfernhout at kurtz-fernhout.com Tue Jun 6 03:48:40 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Mon, 05 Jun 2006 21:48:40 -0400 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: References: <4480C2FE.3060801@kurtz-fernhout.com> <4481D29E.1010805@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> <4482154B.2070300@kurtz-fernhout.com> <13a83ca10606040728i789419e4o28f453fde2bc30df@mail.gmail.com> <448351C9.6060306@kurtz-fernhout.com> <13a83ca10606041738n50b9ed47r3a9a34b73f47cc6@mail.gmail.com> <44846B0C.5040807@kurtz-fernhout.com> <44849D30.7000701@kurtz-fernhout.com> Message-ID: <4484DEF8.5090704@kurtz-fernhout.com> kirby urner wrote: > On 6/5/06, Paul D. Fernhout wrote: > Besides write these posts to edu-sig? When do you ever find the time :-D. Oh, it's part of the design process. :-) (*) From: http://www.pairprogramming.com/ "KNOWLEDGE IS commonly socially constructed, through collaborative efforts towards shared objectives or by dialogues and challenges brought about by different persons' perspectives. -- G. Salomon (book: Distributed Cognitions: Psychological and Educational Considerations)" So, I see these posts and replies as about socially constructing knowledge about good designs for educational computing platforms in Python (both to teach programming in Python and to deploy Python-based educational simulations), based on the needs and feedback of people who actually use Python in education. --Paul Fernhout From kirby.urner at gmail.com Tue Jun 6 04:47:20 2006 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 5 Jun 2006 19:47:20 -0700 Subject: [Edu-sig] PySqueak: pyGTK & Cairo & pygtkglext (OpenGL) next? In-Reply-To: <4484DEF8.5090704@kurtz-fernhout.com> References: <4480C2FE.3060801@kurtz-fernhout.com> <13a83ca10606031423u23133fb1l61a36a1cb5ff6eb4@mail.gmail.com> <4482154B.2070300@kurtz-fernhout.com> <13a83ca10606040728i789419e4o28f453fde2bc30df@mail.gmail.com> <448351C9.6060306@kurtz-fernhout.com> <13a83ca10606041738n50b9ed47r3a9a34b73f47cc6@mail.gmail.com> <44846B0C.5040807@kurtz-fernhout.com> <44849D30.7000701@kurtz-fernhout.com> <4484DEF8.5090704@kurtz-fernhout.com> Message-ID: > So, I see these posts and replies as about socially constructing knowledge > about good designs for educational computing platforms in Python (both to > teach programming in Python and to deploy Python-based educational > simulations), based on the needs and feedback of people who actually use > Python in education. > > --Paul Fernhout Yeah, pretty much what edu-sig has always been about, in large degree. What's changed recently is the PataPata flood. I'm not complaining: all this inventorying of graphical libraries has been useful. I feel much more informed than when we got started. Keep up the good work. Kirby From kirby.urner at gmail.com Tue Jun 6 05:07:19 2006 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 5 Jun 2006 20:07:19 -0700 Subject: [Edu-sig] Accessibility to non CS types? In-Reply-To: <4484DE38.8020500@kurtz-fernhout.com> References: <44775EFB.6070606@kurtz-fernhout.com> <13a83ca10605281500h67954015w85cd3f3b4cbca2f1@mail.gmail.com> <447B30F2.60806@kurtz-fernhout.com> <13a83ca10605291548k2619608bx5a4a42a5a1922c32@mail.gmail.com> <447E8064.3090900@kurtz-fernhout.com> <4484DE38.8020500@kurtz-fernhout.com> Message-ID: On 6/5/06, Paul D. Fernhout wrote: > Even if you don't want to watch the entire 90 minutes, there is a textual > description there of what is presented. > Yes, Alan Kay circled that video at our summit meeting, Kim too. I saw Guido take a peak at the Google version (as did I): http://video.google.com/videoplay?docid=-8734787622017763097 > Perhaps making computers "accessible" to non CS types should involve > teaching them more of the history of computing, i.e. how far we have *not* > come. :-) > I noticed a tendency of some at our meeting to want to hide the gory details of whatever behind the scenes state management software the pros have to use, to create these friendly kindergartens. They didn't seem to want us to tour "the tunnels under Disney world" e.g. why would we ever talk about the various Linux supported file systems. Isn't that antithetical to our goal, of blissful user-independence from the underpinnings? But that's not MY goal. I'm not interested in insulating people beyond a certain level. Make playgrounds to get 'em started, but by all means start conducting tours of the dark side as they mature. It's the same thing we should be doing around the fast food industry. Don't paint over the slaughter houses with a lot of Ronald McDonald imagery. Show the whole industry in the bright light of day. Not incessantly, not while we're eating, but make sure books like 'Chew on This' don't get purged from the library. Let those kids who want to look behind the scenes do so. Otherwise all this "self-discovery" rhetoric is just empty BS. > While I'd rather have my three screen Debian GNU/Linux box and internet of > today than his specific 1960s technology, clearly what Doug Engelbart's > team demonstrated was such a quantum leap from what went before(*) that it > really is barely matched in some ways by today's consumer systems, at > least in spirit almost forty years later -- as around 1968 he demonstrated > real-time collaborative audio and video conferencing and editing over a > network, a dynamic extendable language, hypertext, graphics, the mouse, a > chord keyboard, and so on. Have we really come that much further in four > decades conceptually? In terms of chord keyboard use, for example, we're For the sake of argument, let's so no. Coming up with these brilliant ideas was the relatively easy part. Implementing them to the point of talking "one laptop per child" still only a dream, was much harder. Steve Jobs had to dive in. A lot more talent than just Alan Kay's was required. And *still* we see a lot of room for improvement. There's no reason to gloat, I agree. > still behind his demo (his argument was learning to chord keys was a good > investment for a professional, as beyond the improved speed, you could > also mouse with one hand and chord text with the other). If met a lot of chordist fans over the years. I think when it comes to personal interface devices, it's a rather personal decision. Which keyboard, which kind of mouse. I'll state preferences if asked (especially if we're setting up equipment I'm going to use), but I don't imagine myself prescribing for everyone else, saying thou shalt master the trackball or thumb thingy or whatever. Recommendations and personal testimony are welcome (like in commercial advertising), edicts from on high are not. > I did try to get Doug's newer effort to consider doing the next version in > Python (as part of his "Unfinished Revolution II" Stanford course), as > well as try to hook them up with the Zope people directly, but I had > trouble prying them away from the grip of Sun's Java. :-) See for example: > http://www.bootstrap.org/dkr/discussion/0215.html > (I have long since taken down the experimental Zope site linked there, > though.) I don't think Zope is a good first exposure to Python code. Too complicated under the hood, too much going on that's from the specific knowledge domain (object databases and web publishing). This isn't to diss Zope as a product, nor Plone atop CMF. I've partially overlapped Plone and Zope world quite a bit -- joined a Plone sprint with Alan Runyan and Andy McCay among others, that time in Vancouver BC. > Note: while I thought using Java six years ago was not a very good idea > because at that time, beyond the language's clutter and limitations, the > JVM was also an unstable "write once, debug everywhere" solution with > limited libraries, now, six years later, while I still think Java remains > a problematical language syntactically, I think the JVM itself is a > reasonable deployment vehicle in many situations (i.e. for Jython > applications) and the Java libraries themselves have finally gotten most > of the bugs out and there are some fairly good free versions of JVMs (e.g. > Kaffe) and supporting libraries (e.g. GNU Classpath). > > --Paul Fernhout I have lots of good things to say about Java in my Saturday Academy classes. I don't appreciate it when language bigots say they're promoting Python, when all that means is talking cheap shots at other languages (which isn't to say everything about Java is equally wonderful). > P.P.S. (*) well, this is ignoring Ivan Sutherland's work on Sketchpad, > http://en.wikipedia.org/wiki/Ivan_Sutherland > or Vannevar Bush's Memex concept, I never ignore Memex -- many citations to that Atlantic Monthly article over the years (I learned about it from Ted Nelson). > http://en.wikipedia.org/wiki/Memex > http://www.theatlantic.com/doc/194507/bush Right, that one. I was blathering about hypertext in the early 1980s as well. > I guess I'm kind of working my way through the history of computing with > Python. :-) First Memex, now sort-of a nod towards Smalltalk (and Self) > with PataPata, and then maybe, someday, Augment. :-) A labor of love. Seems kind of solipsistic though, which is why I'm glad you've attracted some fans. That's what edu-sig is good for I think. Kirby From kirby.urner at gmail.com Thu Jun 8 19:08:25 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 8 Jun 2006 10:08:25 -0700 Subject: [Edu-sig] Endlessly looping Pythonic mathematics (hypertoon city!) Message-ID: Very typical routine Math Forum sharing of my Pythonic Mathematics: http://mathforum.org/kb/message.jspa?messageID=4780241 No Arthur in center ring yet. I invited him to join me in the big time tent, having already proved his irascibility and street cred as a tough-minded New Yorker here on edu-sig. I think one reason my Pythonic mathematics approach may not be more popular in the Python community is it requires no changes to Python, no improvements of exactly the kind edu-siggers are into, if they've gone so far to dive head first into Python. Like *of course* we need improvements. However, where I'm starting is with over-thick antediluvian K12 and community college math texts, and TI calculators. I'm in the sewer in other words, dealing with the stench of dead culture, static for decades, toxic to most kids (the docile ones gravitate to cube farms, a kind of Matrix for them, while another generation of zombie teacher gets certified to continue the forced-march sleep walk towards oblivion (good scifi spin, no?)). With Python in the picture, there's no way to go but up (towards higher quality) and it's a long time before we hit the kind of ceiling the pydev types might care about. Just saying "let's talk about mathematics as an extensible type system" after deriving Monkey, Dog and Human from a common Mammal class, is a real eye-opener for them, and it only takes a few minutes, especially with the high quality cartoons. So there's really no contest. Pythonic math is better. And there's plenty of it on the web ready to go. Any enterprising teacher with Internet access is on a launchpad already. So that's really the problem: there's nothing left to brainstorm (I'm kidding, but it can feel that way some days). The ducks are already all in a row, in some static lineup. So it's just the boring implementation part that's slow and unfinished (runtime), waiting for more so-called mathematics teachers to care about computers, let alone programming, let alone some language that sounds like it might bite. Sigh. Twiddling thumbs. Doing nothing. Kirby From kirby.urner at gmail.com Thu Jun 8 19:10:34 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 8 Jun 2006 10:10:34 -0700 Subject: [Edu-sig] Endlessly looping Pythonic mathematics (hypertoon city!) In-Reply-To: References: Message-ID: On 6/8/06, kirby urner wrote: > Very typical routine Math Forum sharing of my Pythonic Mathematics: > http://mathforum.org/kb/message.jspa?messageID=4780241 > Actually, if you can read Python at all, it's the plaintext version you'll want to eyeball: http://mathforum.org/kb/plaintext.jspa?messageID=4780241 Kirby From pdfernhout at kurtz-fernhout.com Fri Jun 9 02:01:37 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Thu, 08 Jun 2006 20:01:37 -0400 Subject: [Edu-sig] Endlessly looping Pythonic mathematics (hypertoon city!) In-Reply-To: References: Message-ID: <4488BA61.50100@kurtz-fernhout.com> kirby urner wrote: > With Python in the picture, there's no way to go but up (towards > higher quality) and it's a long time before we hit the kind of ceiling > the pydev types might care about. Just saying "let's talk about > mathematics as an extensible type system" after deriving Monkey, Dog > and Human from a common Mammal class, is a real eye-opener for them, > and it only takes a few minutes, especially with the high quality > cartoons. > > So there's really no contest. Pythonic math is better. And there's > plenty of it on the web ready to go. Any enterprising teacher with > Internet access is on a launchpad already. You've made this point before, and I essentially completely agree. Python-as-it-is (or any other OK computer language) is a great vehicle for learning, and mathematics really is a subset of computing in some sense, and it makes more sense to present mathematics embodied into a larger meaningful context (including visualization). > So it's just the boring implementation part that's slow and unfinished > (runtime), waiting for more so-called mathematics teachers to care > about computers, let alone programming, let alone some language that > sounds like it might bite. Well, we can all hope it will happen, but consider the alternative (not to reopen an old arguement, but just as a data point :-): A newspaper article from a few days ago: A 'hole in the wall' helps educate India http://search.csmonitor.com/search_content/0601/p13s02-legn.html From that article: "Sugata Mitra, physicist and chief scientist with India's international software giant NIIT Ltd., launched the experiment in 1999 by embedding a kiosk housing a high-speed touch-screen computer into the wall that separates the company's headquarters from New Delhi's biggest slum. Dr. Mitra was surprised to see how quickly the children had mastered navigating the Internet - within hours. ... Hole-in-the-Wall has already helped thousands of previously nonliterate boys and girls teach themselves not only about computers but also "several pieces of primary education," Mitra says. Within nine months, the boys and girls achieve, "the proficiency level equivalent to the skills of most modern office workers." ... "What is being learned with Hole-in-the-Wall is how much kids can just figure out without adult assistance. The question remains as to whether the rate of learning could be accelerated with the aid of a teacher," Mr. Hetzel says. "At the same time, I am in awe of how much these poor kids have taught themselves about computers." ... While the World Bank showed "some interest" in helping meet those costs, Mitra says he doesn't believe that the money, "if it ever comes, will be from the United States," as "primary education is not a priority in the US at the moment." Equally scathing about the Indian government, Mitra speculates that, "in its slow and ponderous way, it may one day think about it." Meantime, as a result of his success here, the innovator has been asked to bring Hole-in-the-Wall to Cambodia and South Africa, which means that, altogether, it has "been verified by 40,000 of the world's poorest children." [Curious who asked him to go to SA?] So it seems the number one thing an educator can do, even in a developing nation (such as the USA :-) is to use their adult skills to give kids access to opportunities to learn which the kids can't put together themselves. Number two might then be making easy-to-use systems. Number three might then be writing good tutorial or on-demand help systems for them, perhaps including screencasts. If the educator has the time and opprtunity to actually be there for kids, then number four might be setting a good example somehow or conveying excitement. I guess after all that, then one can start talking about what other useful things educators can do to help kids learn, like in this book: :-) http://www.inspiredinside.com/learning/postman1.htm or anything by Holt and so on. For example, I liked Holt's suggestions on ways to present basic mathematics to young kids integrating all the basic operations (multiplication, division, addition, subtraction) into a common way of thinking about quantities, e.g. 2 * 3 and 3 + 3 are different ways of walking about the same thing. Part of the problem is, by the time kids are in high school, there is so much (psychical and intellectual) damage related to mathematics to unlearn for so many kids, that it certainly is going to be a difficult problem. I taught computer programming to biology majors at a state university for a couple semesters, and I saw first hand that most people become biology majors in part because they don't like (or know) math, which is especially a shame as so much of modern biology research is heavily mathematically oriented (statistics, simulation, equation development, and so on). Yes, there are exceptions, but the bulk are not mathematically oriented. But if the entire K-12 system has failed these kids, what can someone running a college course realistically hope to accomplish in a semester? (I think most kids took it, this was ten years ago, with a thought to getting a job as a programmer, since entry bio jobs didn't pay as well. :-) Anyway, while Python is very approachable in some ways, it is also not very approachable in others, including interface-wise (which is why Visual basic captured so many people's attention). Also, Python suffers from several inconsistencies which can trip up both novice and causal expert user. Seemingly minor things (e.g. when to use "len()" and ".length" and even the whole issue of inconsistent abbreviation strategy), but each one is another hurdle. Some of those (GUI building) can be easily fixed as add-ons, the others require going over the language and dealing with a community process (so never going to happen?). Still, you remain correct, Python is ready right now to use as a learning platform for mathematics and other things. --Paul Fernhout From andre.roberge at gmail.com Fri Jun 9 03:25:01 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Thu, 8 Jun 2006 22:25:01 -0300 Subject: [Edu-sig] Crunchy Frog 0.4 released Message-ID: <7528bcdd0606081825i7cc788d5m9ca2ead867a0fc00@mail.gmail.com> Hello edu-sig colleagues, Version 0.4 of Crunchy Frog has been released. Thanks to some hard work by Johannes Woolard, Crunchy Frog no longer depends on CherryPy. For those that might be new on this list, Crunchy Frog transforms an ordinary html-based Python tutorial into an interactive environment within your favourite browser. Version 0.4 now includes a graphics canvas (unsupported in IE), in addition to other features included before (embedded Python interpreter, "editor" with facility to interpret the Python code with or without doctests, etc.). I'm waiting to get a dedicated page for Crunchy Frog on sourceforge.net. In the meantime, you can fetch it from the rur-ple site at: https://sourceforge.net/project/showfiles.php?group_id=125834 For those that want to always have the latest, you can always peruse the code in the svn repository at: http://crunchy.python-hosting.com/ Johannes and I welcome any comments you may have. Andr? From kirby.urner at gmail.com Fri Jun 9 17:20:57 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 9 Jun 2006 08:20:57 -0700 Subject: [Edu-sig] Endlessly looping Pythonic mathematics (hypertoon city!) In-Reply-To: <4488BA61.50100@kurtz-fernhout.com> References: <4488BA61.50100@kurtz-fernhout.com> Message-ID: On 6/8/06, Paul D. Fernhout wrote: > You've made this point before, and I essentially completely agree. > Python-as-it-is (or any other OK computer language) is a great vehicle for > learning, and mathematics really is a subset of computing in some sense, > and it makes more sense to present mathematics embodied into a larger > meaningful context (including visualization). Yes, and OO is omnipresent in industry, commerce, as it is in everyday thinking. Object-think is very natural. Connecting "math objects" (such as rational numbers) to "objects in general" is one way to enrich the fantasy life of any child. Plus you come away from math class with new computer programming skills. What could be more wonderful? Of course a *lot* still needs to be done. More lesson planning and training and so on, more of a buzz, plus all those gazillions of cartoons and DVD clip shorts we don't yet have... I could employ a huge number of people if there really were a commitment to Gnu Math out there. You probably could too. But I wouldn't be needing to redundantly mess with Python the language. That's not my job and it already works for my purposes as is. I could help with marketing it though, such as by putting the new Python logo on my minibus or whatever (I'd need PSF permission probably). > Well, we can all hope it will happen, but consider the alternative (not to > reopen an old arguement, but just as a data point :-): > A newspaper article from a few days ago: > A 'hole in the wall' helps educate India Yes. When I say "teacher" I partly investing in a St. Augustine model where the true teacher is within, so all of this adapts to a solo kid facing a hole in the wall (with a computer in it) if those just happen to be the circumstances. I'm not trying to coral every kid in some classroom. I've written extensively about hybrid systems in which older kids spend more time at home, maybe only visiting school buildings three days a week, let's say. I'd also like to see kids able to choose courses all over town, with some corporate sky towers getting in on the act, teaching engineering math or whatever for high school credit, and at no additional cost to taxpayers (but maybe with screening tests to get in -- spaces limited). City-as-campus is an old meme with me. > Meantime, as a result of his success here, the innovator has been asked to > bring Hole-in-the-Wall to Cambodia and South Africa, which means that, > altogether, it has "been verified by 40,000 of the world's poorest > children." [Curious who asked him to go to SA?] I think it's a mistake to further invest in this Hole-in-the-Wall experiment. It's fun the first few times but it's also wasteful of talent. Those kids could use some instruction. To over-romanticize "discovering everything for oneself" is a serious pitfall some constructivists fall into, as if the accumulated metaphysical assets of a civilization can't be synthesized and summarized into transmissable forms. There's something uncomfortably post-holocaust about these Hole-in-the-Wall experiments -- reminds me of the obelisk in 2001 Space Odyssey. > So it seems the number one thing an educator can do, even in a developing > nation (such as the USA :-) is to use their adult skills to give kids > access to opportunities to learn which the kids can't put together > themselves. But that *doesn't* mean leaving them to flounder completely without guidance. Alan Kay was pretty strong at this point in our summit. He's neither expecting nor encouraging kids to reinvent calculus every generation. It'd really suck the air out of the inventor-genius business if all those brilliant minds thought they wouldn't be able to communicate their innovations with coming generations. We *do* write instruction manuals, and we *do* want our kids to be able to read them. Documentation really *does* serve a purpose. > Number two might then be making easy-to-use systems. Number > three might then be writing good tutorial or on-demand help systems for > them, perhaps including screencasts. If the educator has the time and > opprtunity to actually be there for kids, then number four might be > setting a good example somehow or conveying excitement. I agree all these components are needed. I'd emphasize the apprenticeship model, plus giving newbies more opportunities to spectate, to lurk, which is what the Internet has been so good at doing. Adults need this just as much. Using the web, they lurk in alien disciplines, soaking up some of the memes. Computer illiterate adults can dive into mail lists and see what geeks talking to one another looks like (like here). Reality TV is so far way underexploited as a way of letting people lurk. USA culture's fascination with cops and cop shows means a lot of the reality is chasing down criminals (usually not white color -- lurking in on the FBI chasing down scam artists and embezzelers would be more fun than anything dom rel or drug related in my book). > I guess after all that, then one can start talking about what other useful > things educators can do to help kids learn, like in this book: :-) Everyone is an educator of oneself. When we talk about "the teacher" we needn't externalize that role in a different person if that's not relevant. The "teaching function" is intrinsic to our mind-over-brain capabilities (Fuller School model). > http://www.inspiredinside.com/learning/postman1.htm > or anything by Holt and so on. For example, I liked Holt's suggestions on > ways to present basic mathematics to young kids integrating all the basic > operations (multiplication, division, addition, subtraction) into a common > way of thinking about quantities, e.g. 2 * 3 and 3 + 3 are different ways > of walking about the same thing. Python's operator overloading is extremely useful as it shows how we repurpose these operators at will, but usually in accordance with some generalizations studied in group theory i.e. we expect addition and multiplication to come packaged with identities, inverses, and a distributive property relating the two. Closure is also a nice feature, when you can get it. > Part of the problem is, by the time kids are in high school, there is so > much (psychical and intellectual) damage related to mathematics to unlearn > for so many kids, that it certainly is going to be a difficult problem. I Yes. "And now for something completely different" would by the Pythonic spin here. We'd really like to rock the boat, except most of these boats are already at the bottom. > taught computer programming to biology majors at a state university for a > couple semesters, and I saw first hand that most people become biology > majors in part because they don't like (or know) math, which is especially > a shame as so much of modern biology research is heavily mathematically > oriented (statistics, simulation, equation development, and so on). Yes, Which is where OO comes in. Cells are objects. They compute, processwise, using a protein abacus, in such a way as to replicate, flagellate, infiltrate or whatever. > there are exceptions, but the bulk are not mathematically oriented. But if > the entire K-12 system has failed these kids, what can someone running a > college course realistically hope to accomplish in a semester? (I think > most kids took it, this was ten years ago, with a thought to getting a job > as a programmer, since entry bio jobs didn't pay as well. :-) Right. > Anyway, while Python is very approachable in some ways, it is also not > very approachable in others, including interface-wise (which is why Visual > basic captured so many people's attention). Also, Python suffers from I'm for sticking with a lexical interface a lot, even if we go visual in some contexts. We want to spark the imagination much as we do in reading. Start with a lot of picture books, but develop to where you can imagine as you read (don't spend all your time puzzling over this or that word). At that point, the pictures, which were training wheels, start to go away. Great fantasy and science fiction may have no pictures or close to none (cover art maybe). Which is not to diss comics or movies or other media which do the visual work for you. I just think computer programming needs to have some moments when we're not assaulting you visually, but are leaving it to your imagination, and your imagination alone, to supply the visuals. The interface itself is all straight Python code. But then of course we need diagrams and stuff too. This trend to make every interface visually dazzling, or warm and fuzzy in some gooey sugar-coated sense, is over-pampering and ultimately a disservice I think. There's a tendency for geeks to hide behind a wall, doing lots of intensively lexical stuff, but then to pander to end users with what they assume are friendlier graphics, which they themselves hardly use. In my lurk/apprenticeship model, kids get to tour the tunnels under Disney World and see how the engineers actually see and do things. They see how lexical it is sometimes. They read Neal Stephenson's 'In the beginning was the command line'. They train to become competent Morlocks, not helpless Eloi. > several inconsistencies which can trip up both novice and causal expert > user. Seemingly minor things (e.g. when to use "len()" and ".length" and > even the whole issue of inconsistent abbreviation strategy), but each one > is another hurdle. Some of those (GUI building) can be easily fixed as > add-ons, the others require going over the language and dealing with a > community process (so never going to happen?). We learn from human languages and from life not to get tripped up over little inconsistencies. I don't demand perfection. > Still, you remain correct, Python is ready right now to use as a learning > platform for mathematics and other things. > > --Paul Fernhout And we could employ an army of people to revamp the curriculum, were Gnu Math to be understood and adopted even by a small but committed subculture of geeks who care about such things. There's lots of new TV we'd want to make. Lots of new DVDs. We're talking labor intensive here. But it's just not directly about coding up some whiz bang new interface or package. For my purposes, Python is already complete. Sure, it will continue to improve and burgeon with options, such as Rur-ple (I'm not suggesting anyone stop work on pet projects). I'm personally looking forward to more scriptable control over cartoon characters from the command line -- but not "just like Alice" (maybe more like Panda3D). But the goal is to rescue kids from a dying math, a sinking ship. Polishing the brass fixtures on the rescue ship doesn't seem a priority to me. But that's just me. I'm not saying everyone should drop everything and work on Gnu Math. I'm saying Gnu Math is ready to roll. We could make an industry out of it. In the meantime, I'm heading to the beach for some fun in the sun. I don't feel there's much more required of me at this time. Kirby From mpaul at bhusd.k12.ca.us Sun Jun 11 00:53:26 2006 From: mpaul at bhusd.k12.ca.us (Michel Paul) Date: Sat, 10 Jun 2006 15:53:26 -0700 Subject: [Edu-sig] new to python Message-ID: <4485D1C25FBA9B42AEB6337CD568E194FB440A@MAIL.bhusd.k12.ca.us> Hi, I just recently discovered Python, about 2 months ago, and I just fell in love with it. I couldn't believe what I had found. What immediately hit me was how perfect it would be for a math class. I've always liked using mathematical structures for examples of classes, like Fraction or Point, but that would typically be in an intro to CS course using something like Java. I've wanted to find something that would blend easily into an ordinary Algebra course. I experimented using Scheme a little, and though I love Scheme as an intro to CS language, it's awkward working it consistently into a typical math curriculum. But as soon as I saw Python I thought "Perfect!" I expressed my interest in this to Atanas Radenski at Chapman University. I'm going to attend his workshop later this month. He directed me to Kirby Urner's writings, and my reaction to them was a resounding YES! This is EXACTLY what I'd like to pursue! I have learned just enough Python to have shown a little of it to my math department at a meeting recently. I think they liked what they saw, in fact I know they did, but I sense that they're pretty much entrenched in their TI calculators. I sense that they feel the TI is enough. I don't think they quite appreciate the significance of creating something like a Fraction class. I showed them a set of functions: mean(aList), squares(aList), deviationScores(aList) variance(aList): returns mean(squares(deviationScores(aList))) standardDev(aList): returns sqrt(variance(aList)) These could SO easily be implemented in a math class with Python! And I think it would be so much better for Stat students to ARTICULATE these functions rather than to just use a standard deviation key. I just love how the formula for variance turns into a concept rather than a bunch of variables. Of course, you can do the same thing in other languages, but with Python you can so EASILY do it in an ordinary Stat class! Anyway, I'm going to keep on talking to my dept. about these kinds of things. I'd be interested in insights people have regarding Python vs. TI establishment. I was always really bothered by the argument that factoring wasn't as important anymore, because students could find the zeros of a polynomial by graphing it! Somehow that bugs me. I'd argue that factoring is now MORE important. Understanding the properties of natural number is vital for understanding what computation is. So, I'm glad to have found Python and this new educational culture. Peace, Michel Paul From kirby.urner at gmail.com Sun Jun 11 01:16:02 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 10 Jun 2006 16:16:02 -0700 Subject: [Edu-sig] new to python In-Reply-To: <4485D1C25FBA9B42AEB6337CD568E194FB440A@MAIL.bhusd.k12.ca.us> References: <4485D1C25FBA9B42AEB6337CD568E194FB440A@MAIL.bhusd.k12.ca.us> Message-ID: > So, I'm glad to have found Python and this new educational culture. > > Peace, > > Michel Paul > Hey Michel, sounds like we're on the same page. And yes, the TI establishment is quite entrenched. I mostly fight my battles on the Math Forum, which is partially sponsored by TI. Kirby From radenski at chapman.edu Mon Jun 12 03:50:24 2006 From: radenski at chapman.edu (Radenski, Atanas) Date: Sun, 11 Jun 2006 18:50:24 -0700 Subject: [Edu-sig] new to python Message-ID: > From: edu-sig-bounces at python.org [mailto:edu-sig-bounces at python.org] On > Behalf Of Michel Paul ...del... > I have learned just enough Python to have shown a little of it to my math > department at a meeting recently. I think they liked what they saw, in > fact I know they did, but I sense that they're pretty much entrenched in > their TI calculators. I sense that they feel the TI is enough. I don't > think they quite appreciate the significance of creating something like a > Fraction class. I showed them a set of functions: > > mean(aList), > squares(aList), > deviationScores(aList) > variance(aList): returns mean(squares(deviationScores(aList))) > standardDev(aList): returns sqrt(variance(aList)) > > These could SO easily be implemented in a math class with Python! And I > think it would be so much better for Stat students to ARTICULATE these > functions rather than to just use a standard deviation key. I just love > how the formula for variance turns into a concept rather than a bunch of > variables. Of course, you can do the same thing in other languages, but > with Python you can so EASILY do it in an ordinary Stat class! I have not taught math with Python (yet), I only use Python in my intro CS1 class. (Some colleagues of mine at Chapman University are very happy with Python in various math courses, such as abstract algebra and discrete math). While reading Michel's post on the importance of Python in math education, I remembered a recent conversation with a student in one of our Python-based CS1 classes at Chapman University. This student was very positive about how he manages to understand Python and how he becomes more and more interested in CS. Then, all of a sudden, he told me that because of his study of Python (in CS1), he now understands math better and is more confident in his math potential! It was certainly a very pleasant surprise to hear that CS1 with Python enhances student's math background. Why and how? - I can only speculate (as Norbert Wiener put it, a professor is someone who can talk on any subject - for exactly 50 minutes :-) > So, I'm glad to have found Python and this new educational culture. You will be glad when you see real results after a while. Python can be very rewarding. > Peace, > > Michel Paul Speaking of Atanas Radenski mailto:radenski at chapman.edu http://www.chapman.edu/~radenski/ There are wavelengths that people cannot see, there are sounds that people cannot hear, and may be computers have thought that people cannot think -- Richard Hamming From driscollkevin at gmail.com Wed Jun 14 01:37:03 2006 From: driscollkevin at gmail.com (Kevin Driscoll) Date: Tue, 13 Jun 2006 19:37:03 -0400 Subject: [Edu-sig] Pythonic Alg 2, Trig/Func Message-ID: <87a8578e0606131637q5c74ef03h856dedae39f39f46@mail.gmail.com> Next year, I'm going to be drafted back into the Math department after a year of exclusively teaching CS. It looks like I'll have a class of 11th graders in either Alg 2 or Trig/Functions. They are kids not on the AP Calc track (possible 12th grade AP Stats candidates.) I'd love to incorporate programming into the course. A handful of the students will have been in a 10th grade CS class with me and could be helpers in getting the rest of the students up to speed. Has anyone on-list taught a class at this level with Python integration? Kevin From kirby.urner at gmail.com Wed Jun 14 02:17:38 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 13 Jun 2006 17:17:38 -0700 Subject: [Edu-sig] Pythonic Alg 2, Trig/Func In-Reply-To: <87a8578e0606131637q5c74ef03h856dedae39f39f46@mail.gmail.com> References: <87a8578e0606131637q5c74ef03h856dedae39f39f46@mail.gmail.com> Message-ID: Hi Kevin -- I've done a couple Saturday Academy courses that touch on various high school and college level math topics using Python as a vehicle for improving understanding. Sequences and series is one of my starting points. I do figurate then polyhedral numbers to limber up and keep geometry in view, then start getting into the convergent/divergent and chaotic behaviors of sequences (segue to phi via Fibonaccis, fractals via Python's cmath). If you had a Rational class handy, you could carry out a series expansion for sine and cosine to get fully rational results, e.g.: sine (x) == sigma ( ((-1)**n * x ** (2*n + 1))/fact(2*n + 1) ) http://upload.wikimedia.org/math/6/b/f/6bf16b97ce1b4c86ffa1ed55c3fdc25f.png where fact is factorial and sigma is just sum([list]) of n members (however far you want to go out). I was just writing about this recently (about how little use we make of automation to play with these series expansions for trig and log functions -- but why not change that?): http://mathforum.org/kb/message.jspa?messageID=4796483 Kirby On 6/13/06, Kevin Driscoll wrote: > Next year, I'm going to be drafted back into the Math department after > a year of exclusively teaching CS. It looks like I'll have a class of > 11th graders in either Alg 2 or Trig/Functions. They are kids not on > the AP Calc track (possible 12th grade AP Stats candidates.) I'd love > to incorporate programming into the course. A handful of the students > will have been in a 10th grade CS class with me and could be helpers > in getting the rest of the students up to speed. > > Has anyone on-list taught a class at this level with Python integration? > > Kevin From kirby.urner at gmail.com Wed Jun 14 03:21:26 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 13 Jun 2006 18:21:26 -0700 Subject: [Edu-sig] Pythonic Alg 2, Trig/Func In-Reply-To: References: <87a8578e0606131637q5c74ef03h856dedae39f39f46@mail.gmail.com> Message-ID: On 6/13/06, kirby urner wrote: > If you had a Rational class handy, you could carry out a series > expansion for sine and cosine to get fully rational results, e.g.: > > sine (x) == sigma ( ((-1)**n * x ** (2*n + 1))/fact(2*n + 1) ) > Like, sine of 1/3 radian is about: 27047072606210481759999009438891363156074338083237552748240939073 ------------------------------------------------------------------------------------------------------------------ 82663542138830139150090619203306227146181541524716231065600000000 expanding by some 20 terms. Kirby From kirby.urner at gmail.com Thu Jun 15 02:25:26 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 14 Jun 2006 17:25:26 -0700 Subject: [Edu-sig] Pythonic "case statement" Message-ID: Hi Bernie -- Pythoneers (or Pythonistas as some say -- snake charmers) do have a case statement of sorts, thanks to functions (subprocedures) being top level. What does that mean? It means we can pass a function around like a variable, list it, put it in a dictionary, whatever we can do with most any Python object. For example: ==== casestructure.py ==== def f(): x = float(raw_input("What number? ")) return x**2 # 2nd powering def g(): x = float(raw_input("What number? ")) return x**3 # 3rd powering """ >>> g() What number? 10 1000.0 Then: """ switch = [None, None, f, g] # a list. Note: switch[2] would be f. looping = True while looping: """ Show menu, get user input, 0,1 or 2 """ print """ 2. Square a number 3. Cube a number 0. Exit """ usersays = raw_input("Choice? ") if usersays == '0': looping = False else: try: assert usersays in ['2','3'] usersays = int(usersays) except: print "Enter 2,3 or 0" continue mychoice = switch[usersays] # in essence, a switch or case statement output = mychoice() # call whichever function was selected print output ==== casestructure.py ==== Of course that's not very many choices (just two), but it illustrates using a list of functions, and a numeric index, to do one of those loopy menu programs people used to do, pre the dawn of the event-driven GUI app. I'm also showing some other charming snake tricks. Kirby Cc: edu-sig (where we debate about ways to teach Python to busy science professionals such as yourself). You may get some follow-up traffic, we hope on topic. From kirby.urner at gmail.com Thu Jun 15 02:49:04 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 14 Jun 2006 17:49:04 -0700 Subject: [Edu-sig] Pythonic "case statement" In-Reply-To: References: Message-ID: > """ > Show menu, get user input, 0,1 or 2 > """ > Here's some fallout already: a "bug" in my comment. Should be 2,3 or 0. But note how you can clump all this multi-line output in just one print statement. I've seen some newbies go print, print, print all the way down the right side, avoiding this elegant solution. > print """ > 2. Square a number > 3. Cube a number > 0. Exit > """ A next thing to do with big print blocks is interpolate strings from a dictionary. Like with 8th graders I'll write a little story, leaving out key nouns, verbs and adjectives. Or they write the story... """ Once upon a time, some Swiss escaped to New Zealand to avoid persecution by a dominant denomination (in their case, Catholics, though this brand of Jesus freak was much outnumbered in other parts of the world, and therefore likewise vulnerable to persecution by some fanatical lot). """ Now we could replace Swiss, New Zealand, Catholics and Jesus with %(keystring)s, like so: >>> storytemplate = """ Once upon a time, some %(beleaguered people)s escaped to %(some promised land)s to avoid persecution by a dominant denomination (in their case, %(whatever nutcases)s, though this brand of %(so-called followers)s was much outnumbered in other parts of the world, and therefore likewise vulnerable to persecution by some fanatical lot). """ Then you could tell a whole different story this way: >>> mystory = {'beleaguered people':'Cherokee' , 'some promised land':'a godforsaken spot', 'whatever nutcases' : 'cowboy Anglos and Euros with guns', 'so-called followers':'violent gun worshipper'} Now the merge operation (string substitution, pulling from the dictionary): >>> print storytemplate % mystory Once upon a time, some Cherokee escaped to a godforsaken spot to avoid persecution by a dominant denomination (in their case, cowboy Anglos and Euros with guns, though this brand of violent gun worshipper was much outnumbered in other parts of the world, and therefore likewise vulnerable to persecution by some fanatical lot). Doesn't ring quite true does it? For one thing, I'm obviously not Cherokee. But I think you get the idea (of using dictionaries to populate prekeyed blocks of text). Kirby From kirby.urner at gmail.com Thu Jun 15 02:55:05 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 14 Jun 2006 17:55:05 -0700 Subject: [Edu-sig] Pythonic "case statement" In-Reply-To: References: Message-ID: > But note how you can clump all this multi-line output in just one > print statement. I've seen some newbies go print, print, print all > the way down the right side, avoiding this elegant solution. > ...left side... Note to edu-sig readers: I'd like ya'll to meet Bernie Gunn. We've been sharing some geneology lately, keying off my Swiss name (Urner). Our family escaped (I suppose -- Church of the Brethren), pre 1776, to what would someday become The Federation of States we call the United States even today (it almost fell apart a few times). Bernie's family, based in New Zealand, can trace some similar roots, though to a different Kanton (ours, Uri, contains Altdorf). Bernie is a geochemist with a lot of Pascal experience, but nowadays he's thinking of the future and wanting to use a more modern language. His shop is experimenting with Python, but not exclusively. Java is also getting a workout. Anyway, I've got a couple posts mentioning Bernie in my blog, if you want some more background: http://worldgame.blogspot.com/2006/05/coffee-shop-physics.html http://worldgame.blogspot.com/2004/12/view-from-middle-earth.html Kirby From delza at livingcode.org Thu Jun 15 03:08:42 2006 From: delza at livingcode.org (Dethe Elza) Date: Wed, 14 Jun 2006 18:08:42 -0700 Subject: [Edu-sig] Pythonic "case statement" In-Reply-To: References: Message-ID: <24d517dd0606141808k4e19646ald6e55e2537826a1@mail.gmail.com> On 6/14/06, kirby urner wrote: > Hi Bernie -- > > Pythoneers (or Pythonistas as some say -- snake charmers) do have a > case statement of sorts, thanks to functions (subprocedures) being top > level. > [snipped] I generally use a dict for this, mainly because my keys are more often strings than integers. For example, a skeleton for a CGI-based REST application: def get(arg): print 'responding to a GET' def post(arg): print 'responding to a POST' def put(arg): print 'responding to a PUT' def delete(arg): print 'responding to a DELETE' def main(): import os import cgi method = os.environ.get('REQUEST_METHOD', 'GET') arg = cgi.FieldStorage().getfirst('value') # dispatch to the appropriate function dict(GET=get, POST=post, PUT=put, DELETE=delete)[method](arg) if __name__ == '__main__': main() --Dethe From kirby.urner at gmail.com Thu Jun 15 04:35:12 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 14 Jun 2006 19:35:12 -0700 Subject: [Edu-sig] Pythonic "case statement" In-Reply-To: <24d517dd0606141808k4e19646ald6e55e2537826a1@mail.gmail.com> References: <24d517dd0606141808k4e19646ald6e55e2537826a1@mail.gmail.com> Message-ID: > # dispatch to the appropriate function > dict(GET=get, POST=post, PUT=put, DELETE=delete)[method](arg) > Very cool Dethe. This equals sign form of dict is one I can't recall seeing. And yes: "dispatch" is the appropriate word to be using here. I have encouraged Bernie to think about returning geochemical data in the form of web pages, in response to various queries. Maybe he'll file your example of a little CGI script for later. Bernie is frustrated by the low level of awareness many geochemists have of how computers could be helping them. I regard this as a failure of CS more than of geochemistry -- mainly because CS is what we're in a position to influence on edu-sig, less so the earth sciences. Kirby From kirby.urner at gmail.com Fri Jun 16 23:58:20 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 16 Jun 2006 14:58:20 -0700 Subject: [Edu-sig] Intelligent CS Design Message-ID: So here's a CS sequence I'd like to see (except it's more like a network, with multiple entry and exit points): First, we admit that the C language is of lasting relevance, not a dead language in any way, but an under-the-hood language for just about everything kernel, tcp/ip and who knows what else. Oh yeah, and Python. We're not going to bleep over C in other words. But we start with Python, just like we've been saying on this list. Makes sense. But then, before going on to Java or C# (the common wisdom at this point), we offer a fork, with the harder core CS types maybe heading into unrefined C, and into the source code of CPython in particular. So now you'll get to see how a list works, how a dictionary works, in non-OO C. Wow, what a difference. Who knew? A real eye opener for a lot of gnubees. I call this the "tunnels under Disney World tour." We'll do it again when we explore other Python implementations (Jython, IronPython...), but here's a great place to get our feet wet, in the language of the Linux kernel. C is the lingua franca, the Latin if you will, behind so many later OO versions: Java, C#, C++... and Python. So by this route, we come out ahead, conversant both with an interpreted, and with a fast, close to the metal code (just a step above MMIX, which we'll also need to get to -- http://www-cs-faculty.stanford.edu/~knuth/mmix.html ). That's more well-rounded than just staying on top of a VM all the time (Java's, .NET's, whatever's). Now, for the less hard core (non-CS majors), we'll start the same way, with an overview (lots of history) with Python show-cased for illustrating key concepts (flow structures, file i/o, basic algorithms). Given some students will have started along a Gnu Math trajectory much earlier, in conjuction with "math objects", they may well have used Python for some years (Pythonic math). So we should assume an average programming language fluency level greater than zero (and way higher than today's). For these non-CS majors, we fork in various directions. VPython and Panda3D type packages take you more in the direction of computer animation, although the ability to write a still life, per POV-Ray, is still highly relevant (render farms then connect these key frames). Or maybe we could go XML and SOAP, cgi in Apache, MySQL... whatever the career path demands. NumPy? Just about any profession is going to use computers in some way. Our intro sequence at least gets you pointed in the right direction. Back to the majors: now that they've learned lots of Python, and lots of C, they're ready to dive more deeply into the world of parsing and compiling, or interpreting byte codes if on a VM (the VM takes the place of the chip). We should talk more about PyPy at this point. CS majors are heading in multiple directions too. Some will go deeper into the chip, some will fly high in new language design, or design patterns. Many will join industry at some point, in some ways echoing their counterparts in bioinformatics, the earth sciences or whatever. Because CS will have done a good job, we'll have many namespaces in common, a heritage strong enough to keep us united in the face of our common enemy: ignorance and incompetence -- those qualities that make life more difficult and less fun than it really needs to be. Kirby From da.ajoy at gmail.com Sat Jun 17 19:22:13 2006 From: da.ajoy at gmail.com (Daniel Ajoy) Date: Sat, 17 Jun 2006 12:22:13 -0500 Subject: [Edu-sig] Pythonic Alg 2, Trig/Func In-Reply-To: Message-ID: <4493F3F5.31555.ED58D28@da.ajoy.gmail.com> > Date: Tue, 13 Jun 2006 19:37:03 -0400 > From: "Kevin Driscoll" > > Next year, I'm going to be drafted back into the Math department after > a year of exclusively teaching CS. It looks like I'll have a class of > 11th graders in either Alg 2 or Trig/Functions. They are kids not on > the AP Calc track (possible 12th grade AP Stats candidates.) I'd love > to incorporate programming into the course. A handful of the students > will have been in a 10th grade CS class with me and could be helpers > in getting the rest of the students up to speed. > > Has anyone on-list taught a class at this level with Python integration? > > Kevin You could use PyLogo and ask them to try: #22, 23, 24, 43, 44, 45, 46, 47, 48, 49 - 64, 78 http://mondragon.angeltowns.net/paradiso/Construcciones.html Daniel From kirby.urner at gmail.com Mon Jun 19 20:57:31 2006 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 19 Jun 2006 11:57:31 -0700 Subject: [Edu-sig] Rich Data Structures plus Knowledge Domain Object Sets Message-ID: I've earlier posted about providing students with more than just template example data, organized in whatever structures, mostly to drive the discussion of the structures themselves (dictionary, list, array, tree, network, bag, multi-set, queue, stack, hash table ... and so on (yes, I'm deliberately jumbling the namespaces here)). We could do foods and their breakdown, in terms of protein, fats, calories. We could do planets and their moons, plus quasi-planets, comets and whatever. You wouldn't want a completely flat list for most knowledge, when you could be nesting dictionaries or whatever. I'm thinking of what I did for Bernie: showed him how to accommodate "no fixed order" mineral content data from around the world, and organized by named sample, within a two dimensional dictionary names samples (read from csv files using the Standard Library csv module)). Now he can go samples[sampleid][mineral] and get a floating point for his other computations. I've also posted about starting warm and fuzzy in animal world, with OO notation, usually around Mammals and such. Subclasses Monkey, Human and Dog have been a feature of my teachings, with gnu math shell commands such as as h1 = Human("Tom Cruise") appearing in some of them. The class definition specifies an empty stomach at birth (__init__), while the eat method echoes the random foods ("Thanks for the...") appended to self.stomach. A more elaborate class would treat stomach as a queue, but in these first cartoons, we're not trying to get so literal. I let objects eat each other, even themselves. Note: if we have rich nutrition information in a database of foods, then a digestion model might be coupled with an energy model. The object would "burn" calories per each method executed. Running up hill word burn them faster than watching TV, although they say Bobby Fischer lost entire pounds during a game of chess, given how hard his brain worked. http://en.wikipedia.org/wiki/Bobby_Fischer The combination of these two looks intriguing, let's say where a focus on local biologies and ecosystems is strong (the hallmark of a good local school). Really flesh out the local animal system in OO notation, to some level of detail, with a discussion of lifestyles, predatory trees, methods of camouflage, seasonal fluctuations and so on. In North America, the local py files might include grizzly bears. In South Africa, dung beetles and elephants. We're doing open source here, so if TuxLab Kusasa pumps out a decent infra-coastal ecosystem model, at least data-wise, TuxLab Durban 17 might simply import that into a more struct-like set of Python classes, for teaching about Nemo and such. Lion King, Jungle Book... lots of cultural memories, plus older material (some lifestyles trace back a very long time in that neck of the woods, as the cave paintings attest). The point is to make learning about data structures, OO syntax, a data rich experience, infusing knowledge domain material in a nutritious "py dough". The Python modules in question might be about earth science, astronomy, anatomy, zoology, gemology or whatever. In some modules, we might confine our scope to the breeding tree we call "dog space" (they say any random two can mate, assuming necessary equipment, so it's still just the one species, but I'd hate to see that experiment actually tried (I'll just take their word for it)). Sarah-the-dog is under my desk as I write this, enjoying the company of my feet. We have a fenced back yard, plus she gets walks in the neighborhood. The last time we went to the beach (Manzanita, hot tub) she didn't get to join us. No dogs in the hot tub, nor in the house that owns it. Also this AM: Tara has been doing stuff with iTunes, getting a lesson in how to pump up bike tires (my two needed at least 80 PSI (this is the bike I did Seattle to Portland with, a couple years back)). Given my geometric focus, I'm already packaging knowledge domains that I know the most about. My polyhedra come in several flavors, however my niche market has been modules such as rbf.py i.e. my Fuller School stuff (we pickle some of Fuller's most important innovations). So that's one of my chief exports from the Portland Tech District (an area close in to the Willamette, on the east side, where my wife keeps her Turning The Wheel business going (glass desktop, flat screen monitor, multimedia CPU)). My OSCON 2005 presentation was about thanking the open source community for making my job as a Fuller Schooler so much easier. I recapitulated a lot of that in my publicly streamed QuickTime video @ LKL, delivered in close chrono-proximity to my Shuttleworth Summit blog posts (see worldgame, controlroom, mybizmo @ Google's blogspot.com for more info). We also plan to branch out into rich data *reprocessing* i.e. downloading publicly available data and bundling it up in rich data structures (Ruby's or Perl's, as easily as Python's). This group undertaking is for inhouse development mostly, not for retail pricing (let others rush to shrink wrap). Education systems need this stuff in a hurry and for free (especially the basic math objects), along with encouragement to copy the stuff and enhance it. We'll charge for the more proprietary knowledge domains perhaps, but core liberal arts stuff shouldn't be held hostage for money, and we need to circumvent those who think it should be (circumvention is also what those boring old public libraries are about, the ones with all those DVDs, as well as books, not just the Internet, however dynamic and appealing (libraries and the Internet are very much in synergy)). Indeed, the education network itself is a *source* of good things, which businesses then pirate off with for pay dirt. We call it: going to a real school (one that gives you your money's worth in terms of skills and connections), and then getting a real job (one that appreciates and values your performance and in a field you yourself respect (garbage collection is a vital service that Python provides, whereas in primitive C you still need to take out your own trash)). 4D Solutions is not the kind of business that vultures around schools, waiting for tidbits and clues to make a killing with. I'm more into thinking like a think tank, a knowledge lab, tucked away in the Silicon Forest someplace, and already within the ramparts. I'm not always for profit, nor am I all things to all people, but at least my shop is efficient at what it does -- like a well equipped bicycle co-op, expertly staffed, or like a race car ready for the next lap (we just saw the movie Cars yesterday, so I'm not surprised at this metaphor). Kirby From delza at livingcode.org Tue Jun 20 00:08:49 2006 From: delza at livingcode.org (Dethe Elza) Date: Tue, 20 Jun 2006 07:08:49 +0900 Subject: [Edu-sig] Rich Data Structures plus Knowledge Domain Object Sets In-Reply-To: References: Message-ID: <24d517dd0606191508g45198d3jeaed8e702efc3dd1@mail.gmail.com> > We also plan to branch out into rich data *reprocessing* i.e. > downloading publicly available data and bundling it up in rich data > structures (Ruby's or Perl's, as easily as Python's). This group > undertaking is for inhouse development mostly, not for retail pricing > (let others rush to shrink wrap). For rich data structures, you might want to look at JSON. The structures are suitable for reading directly with Javascript and Python (being a subset of those languages' notations for dicts and lists), but there are libraries for reading it in Perl, Java, C, etc. Super-simple to use and extremely portable. XML is also an option, but lots of people are XML averse these days. The two biggest wins with XML are that it uses unicode and provides structure, and JSON (which I believe is specified as UTF-8 encoded unicode) gives you both of those without all the other baggage XML brings with it. http://json.org/ --Dethe From kirby.urner at gmail.com Wed Jun 21 01:04:51 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 20 Jun 2006 16:04:51 -0700 Subject: [Edu-sig] Designing CS... Message-ID: This tagline gives the plot: """ So right off the bat, Gnu Math is in turmoil. Are we trying to visit the tunnels under Disney World, as I contend, or are we keeping them blissfully in a bubble, making them think the whole world is as squeaky clean as Squeak? """ That's from the Math Forum this morning. http://mathforum.org/kb/thread.jspa?threadID=1401016 How much of the gnarly underbelly of geek culture are we wanting to teach, and at what level? Jerritt plunged right in with tcp/ip at West Precinct that time, and I'm thinking that's probably as good a place to start as any. Motherboard internals can wait. So I posted about tcp/ip in my blog yesterday, giving a flavor. I'm saying Gnu Math should not avoid the low level. Consistently and consequently, I advocate diving into C after Python along a strong CS track, to understand how CPython is implemented under the hood -- as well as how to extend it. Then maybe we'll resurface in Java and/or C# over bridges in the corresponding Python implementations (Jython and/or IronPython). It's not like we have to go over every built-in or library module at the same level of detail every time. But hey, now you've got the hang of C, and the way it thinks about memory (addresses, pointers). That'll help you solve a lot of puzzles, at least through some career doors. And no, I'm not forgetting about C++ (the basis of wx and many other extensions). Some will go in reverse (it's a network, not just a sequence): e.g. drill down starting in IronPython, and get back to C via the bytecodes-on-a-VM. In Mono (an implementation of a shared ANSI/ISO/ECMA type standard), the target bytecodes are prespecified, and provide a shared platform for many languages. Guido invented his own bytecodes for CPython, a unilanguage VM, when the whole idea of a VM was still quite new, and an advance over the early "interpreter" idea -- like what bash does. BTW how're things coming with Parrot? I'm soo out of date. Anyway, I'm for using Python to awaken self-selecting "users" out of a blissful ignorance (however comfortable) and start getting them oriented to the plumbing that makes it all work. Via Python, you have the opportunity to move from "user" to "hacker" perhaps by way of "gnubee" (as in "student of gnu math"). In the gnu world, we don't hide the fact that the low level stuff gets ugly and that ugly hacks exist. Engineering is just like that, and there's no shame in admitting it, showing it, and inviting fresh solutions. There's also just a lot of ancient working machinery, not ugly per se, but still rather complicated and ornate. We want to show that off too. Kirby From driscollkevin at gmail.com Wed Jun 21 01:45:38 2006 From: driscollkevin at gmail.com (Kevin Driscoll) Date: Tue, 20 Jun 2006 19:45:38 -0400 Subject: [Edu-sig] Designing CS... In-Reply-To: References: Message-ID: <87a8578e0606201645i7c018888n7f450994d5603aab@mail.gmail.com> As my school is not large enough to support such a focused programming curriculum and I want to appeal to many sides of computing / networked culture, I just finished teaching a 10-12th grade elective with ESR's "How to become a hacker" essay as a framework. (See: http://www.catb.org/~esr/faqs/hacker-howto.html ) Build up a PC. Install Ubuntu. Write XHTML/CSS in a text editor. Learn Python. All the while blogging and talking about the social implications to blogging, MySpace, closed-v-open source, open-v-free, etc. ESR's 4th assertion ("Learn English") was especially fertile ground in a class with many non-native English speakers. We asked why Python would have English-sounding words as built-in functions. Now I have a cohort of students with a semester of Python under their belts and I'm starting to plan for next year. The students that stick with me will be ready for a more strict programming curriculum. Though I'm wary of switching languages, your email is intriguing. It's helpful to think of languages as tools - each with its own strength and purpose. Has anyone taught Ruby at the K12 level? I love its object-oriented nature and the whole workflow would be familiar to my young Python programmers but I worry that jumping to another language is too soon. Kevin On 6/20/06, kirby urner wrote: > This tagline gives the plot: > > """ > So right off the bat, Gnu Math is in turmoil. Are we trying to visit > the tunnels under Disney World, as I contend, or are we keeping them > blissfully in a bubble, making them think the whole world is as > squeaky clean as Squeak? > """ > > That's from the Math Forum this morning. > http://mathforum.org/kb/thread.jspa?threadID=1401016 > > How much of the gnarly underbelly of geek culture are we wanting to > teach, and at what level? Jerritt plunged right in with tcp/ip at > West Precinct that time, and I'm thinking that's probably as good a > place to start as any. Motherboard internals can wait. > > So I posted about tcp/ip in my blog yesterday, giving a flavor. I'm > saying Gnu Math should not avoid the low level. Consistently and > consequently, I advocate diving into C after Python along a strong CS > track, to understand how CPython is implemented under the hood -- as > well as how to extend it. > > Then maybe we'll resurface in Java and/or C# over bridges in the > corresponding Python implementations (Jython and/or IronPython). It's > not like we have to go over every built-in or library module at the > same level of detail every time. > > But hey, now you've got the hang of C, and the way it thinks about > memory (addresses, pointers). That'll help you solve a lot of > puzzles, at least through some career doors. And no, I'm not > forgetting about C++ (the basis of wx and many other extensions). > > Some will go in reverse (it's a network, not just a sequence): e.g. > drill down starting in IronPython, and get back to C via the > bytecodes-on-a-VM. In Mono (an implementation of a shared > ANSI/ISO/ECMA type standard), the target bytecodes are prespecified, > and provide a shared platform for many languages. Guido invented his > own bytecodes for CPython, a unilanguage VM, when the whole idea of a > VM was still quite new, and an advance over the early "interpreter" > idea -- like what bash does. > > BTW how're things coming with Parrot? I'm soo out of date. > > Anyway, I'm for using Python to awaken self-selecting "users" out of a > blissful ignorance (however comfortable) and start getting them > oriented to the plumbing that makes it all work. Via Python, you have > the opportunity to move from "user" to "hacker" perhaps by way of > "gnubee" (as in "student of gnu math"). > > In the gnu world, we don't hide the fact that the low level stuff gets > ugly and that ugly hacks exist. Engineering is just like that, and > there's no shame in admitting it, showing it, and inviting fresh > solutions. There's also just a lot of ancient working machinery, not > ugly per se, but still rather complicated and ornate. We want to show > that off too. > > Kirby > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > From kirby.urner at gmail.com Wed Jun 21 02:12:14 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 20 Jun 2006 17:12:14 -0700 Subject: [Edu-sig] Designing CS... In-Reply-To: <87a8578e0606201645i7c018888n7f450994d5603aab@mail.gmail.com> References: <87a8578e0606201645i7c018888n7f450994d5603aab@mail.gmail.com> Message-ID: > Has anyone taught Ruby at the K12 level? I love its object-oriented > nature and the whole workflow would be familiar to my young Python > programmers but I worry that jumping to another language is too soon. > > Kevin > Hi Kevin -- In your shoes, I probably wouldn't jump with both feet into another language. I'd stick with Python, but begin using the growing familiarity as leverage to start peeling back the covers on some of these other languages, especially those with an OO flavor. This will heighten student confidance that Python isn't "boxing them in" (i.e. the skills and concepts are transferrable). Plus students should be encouraged to study on their own. That's the biggest challenge I think: to make clear that doing homework is about developing one's kung-fu (I've seen teens practice for hours with a skateboard -- it's not like they don't know the value of practice (they just need to discover what it *means* to practice in the gnu math domain)). I liked that you had lots of lively dialog about the social implications, and discussed the repercussions of using English in the namespaces. As Daniel Ajoy, erstwhile frequenter of this list, has shown, it's entirely feasible to start using non-English names with native speakers of other languages (he does this most famously in Logo, but I'm sure in other languages as well): http://mondragon.angeltowns.net/logofe/index.html Anyway, I think it's always at least a two way street, in that cyberculture is being infused with unicode glyphs from many cultures, and its only a matter of time before a lot of them find machine executable contexts. I don't even know how far we've come to date i.e. if there's a lot of Cyrillic Python source code out there, I haven't eyeballed it yet. But the technology isn't standing in the way. Ruby in Thai is just as feasible. But just because we *can* do these things doesn't mean we should all rush away from a common standard, in post Tower of Babel fashion. Sticking with English primitives and romanji more generally solves a lot of problems that don't need to be resolved right now, given other problems are more pressing. Getting native fonts for newspapers, for example, made more sense than messing with the coding languages, and that's been more the focus. Typesetting, not programming. I think that was appropriate. So... I guess what I'd share with your non-English speaking kids is that geek culture is a multi-culture, and it's hardly surprising that Latin-1 would have lasting influence in many namespaces. That's not to the exclusion of other languages or character sets. Plus there's room for the I-Ching, other weird notations, plus all that funny looking math stuff. Plus there's always APL and J. What's so English-looking about those? Kirby From driscollkevin at gmail.com Wed Jun 21 02:28:39 2006 From: driscollkevin at gmail.com (Kevin Driscoll) Date: Tue, 20 Jun 2006 20:28:39 -0400 Subject: [Edu-sig] Designing CS... In-Reply-To: References: <87a8578e0606201645i7c018888n7f450994d5603aab@mail.gmail.com> Message-ID: <87a8578e0606201728w7c076754ue53490ebb2257009@mail.gmail.com> In a fascinating turn, few raised any objection to the English emphasis. As regular web users, they understand and value the common language. Some of my in-class examples use Spanish vocabulary for variable names to emphasize the flexibility that exists in naming variables, functions, etc. verses the f(x) = y they are familiar with. In my experience, the critical piece to student buy-in is REALNESS. One of my students got involved with a Magic Card group that needed its website worked on. He volunteered his services only to discover that they used some homebrew PHP on the backend. I loaned him a "quickstart" PHP book and he spent a ton of time messing around. We have regular programming competitions in class ("Slithers") and for the last one, I brought in a local programmer to be a guest judge. His presence changed the entire dynamic and many students did their best work that morning. Kevin On 6/20/06, kirby urner wrote: > > Has anyone taught Ruby at the K12 level? I love its object-oriented > > nature and the whole workflow would be familiar to my young Python > > programmers but I worry that jumping to another language is too soon. > > > > Kevin > > > > Hi Kevin -- > > In your shoes, I probably wouldn't jump with both feet into another > language. I'd stick with Python, but begin using the growing > familiarity as leverage to start peeling back the covers on some of > these other languages, especially those with an OO flavor. This will > heighten student confidance that Python isn't "boxing them in" (i.e. > the skills and concepts are transferrable). > > Plus students should be encouraged to study on their own. That's the > biggest challenge I think: to make clear that doing homework is about > developing one's kung-fu (I've seen teens practice for hours with a > skateboard -- it's not like they don't know the value of practice > (they just need to discover what it *means* to practice in the gnu > math domain)). > > I liked that you had lots of lively dialog about the social > implications, and discussed the repercussions of using English in the > namespaces. > > As Daniel Ajoy, erstwhile frequenter of this list, has shown, it's > entirely feasible to start using non-English names with native > speakers of other languages (he does this most famously in Logo, but > I'm sure in other languages as well): > http://mondragon.angeltowns.net/logofe/index.html > > Anyway, I think it's always at least a two way street, in that > cyberculture is being infused with unicode glyphs from many cultures, > and its only a matter of time before a lot of them find machine > executable contexts. > > I don't even know how far we've come to date i.e. if there's a lot of > Cyrillic Python source code out there, I haven't eyeballed it yet. > But the technology isn't standing in the way. Ruby in Thai is just as > feasible. > > But just because we *can* do these things doesn't mean we should all > rush away from a common standard, in post Tower of Babel fashion. > Sticking with English primitives and romanji more generally solves a > lot of problems that don't need to be resolved right now, given other > problems are more pressing. > > Getting native fonts for newspapers, for example, made more sense than > messing with the coding languages, and that's been more the focus. > Typesetting, not programming. I think that was appropriate. > > So... I guess what I'd share with your non-English speaking kids is > that geek culture is a multi-culture, and it's hardly surprising that > Latin-1 would have lasting influence in many namespaces. > > That's not to the exclusion of other languages or character sets. > > Plus there's room for the I-Ching, other weird notations, plus all > that funny looking math stuff. Plus there's always APL and J. What's > so English-looking about those? > > Kirby > From kirby.urner at gmail.com Wed Jun 21 04:25:29 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 20 Jun 2006 19:25:29 -0700 Subject: [Edu-sig] Designing CS... In-Reply-To: <87a8578e0606201728w7c076754ue53490ebb2257009@mail.gmail.com> References: <87a8578e0606201645i7c018888n7f450994d5603aab@mail.gmail.com> <87a8578e0606201728w7c076754ue53490ebb2257009@mail.gmail.com> Message-ID: On 6/20/06, Kevin Driscoll wrote: > We have regular programming competitions in class ("Slithers") and for > the last one, I brought in a local programmer to be a guest judge. > His presence changed the entire dynamic and many students did their > best work that morning. > > Kevin > Your class sounds like a lot of wholesome "hard fun" and I encourage you to keep sharing narrative accounts, as I often do when teaching (I'm not doing any classes right now, trying to get back into cycling, other healthy stuff -- just screen and keyboard takes a toll (not that I'm giving up either (nor driving, per DMV blog post today))). Kirby From driscollkevin at gmail.com Wed Jun 21 05:46:49 2006 From: driscollkevin at gmail.com (Kevin Driscoll) Date: Tue, 20 Jun 2006 23:46:49 -0400 Subject: [Edu-sig] Designing CS... In-Reply-To: References: <87a8578e0606201645i7c018888n7f450994d5603aab@mail.gmail.com> <87a8578e0606201728w7c076754ue53490ebb2257009@mail.gmail.com> Message-ID: <87a8578e0606202046k75cc1256p2c16236d5b3882fa@mail.gmail.com> A fun extension to this is honoring the winning team with rasterbation (surprisingly no snickers at that word!) via http://homokaasu.org/rasterbator/ Check : http://flickr.com/photos/believekevin/147147175/ You can't see it in the photo but we posted a printout of their winning code next to the poster. Kevin On 6/20/06, kirby urner wrote: > On 6/20/06, Kevin Driscoll wrote: > > > We have regular programming competitions in class ("Slithers") and for > > the last one, I brought in a local programmer to be a guest judge. > > His presence changed the entire dynamic and many students did their > > best work that morning. > > > > Kevin > > > > Your class sounds like a lot of wholesome "hard fun" and I encourage > you to keep sharing narrative accounts, as I often do when teaching > (I'm not doing any classes right now, trying to get back into cycling, > other healthy stuff -- just screen and keyboard takes a toll (not that > I'm giving up either (nor driving, per DMV blog post today))). > > Kirby > From kirby.urner at gmail.com Wed Jun 21 21:35:42 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 21 Jun 2006 12:35:42 -0700 Subject: [Edu-sig] Gnu Math as Lightning Talk Message-ID: I think I've got it down to about 10 minutes, if not 5, per my blog post of this morning: http://mybizmo.blogspot.com/2006/06/more-adventures-with-tinkerbell.html This is good, in case I get to pitch it studios, the way I'm planning, as I think gnu math will only really fly if it comes prepackaged with matching video (lotsa copyleft DVD clips), plus new flavors of reality TV. Hollywood has had its way with computers for so long (way back to 'Hackers' with Angelina), I think it's time it pay back, with some attention to the real world for a change, instead of always this faux scifi version of everything (Hollywood is a misinformation pump, by design). Or call it "day time television" (where we already slot the soaps -- but in this age of satellite and cable, why pretend bandwidth is the limiting factor -- that really *can't* be the problem now can it). If you can't see a way to do this on prime time, think in terms of a "reality show" the under-employed might adopt, and acquire some job skills by watching. Think of the opportunities to cultivate brand loyalty. 4D Solutions, a pioneer in open source. Our TV is not boring, not with all those cartoons and computer animations. Geek TV. S'been a topic in my blog for years. Not much happening though, as Nick Consoletti might tell ya. Everyone is waiting for everyone else I guess. A demons' embrace. A conundrum. Kirby From glingl at aon.at Fri Jun 23 00:37:14 2006 From: glingl at aon.at (Gregor Lingl) Date: Fri, 23 Jun 2006 00:37:14 +0200 Subject: [Edu-sig] News about turtle graphics Message-ID: <449B1B9A.4070405@aon.at> 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" From andre.roberge at gmail.com Fri Jun 23 04:44:21 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Thu, 22 Jun 2006 23:44:21 -0300 Subject: [Edu-sig] [ANN] RUR-PLE version 0.9.9 Message-ID: <7528bcdd0606221944t42c36ff9md4db743bba6b9909@mail.gmail.com> Roberge's Used Robot: a Python Learning Environment Version 0.9.9 of RUR-PLE has been released. It can be found at: https://sourceforge.net/project/showfiles.php?group_id=125834 RUR-PLE should work properly on all major platforms (Mac, Linux and Windows) in 3 different languages (English, French, Spanish). Feedback would be appreciated to confirm this prior to release of version 1.0. -------------------------------------- Learning to program computer should be fun, for adults and children alike. RUR-PLE is an environment designed to help you learn computer programming using Python. RUR-PLE is a wxPython-based app. RUR-PLE contains four main elements: 1. Lessons viewable within an incorporated browser. Version 0.9.9 includes over 40 lessons introducing Python. A few more will be written for the 1.0 release. 2. A "robot world" with a robot that can accomplish tasks through Python programs. 3. A built-in interpreter which can be used to play with Python. 4. A built-in file editor which can be used for futher Python explorations. This version includes a triilingual (English, French and Spanish) interface. Translations to other languages are welcome. Only English lessons are included. Andr? From kirby.urner at gmail.com Fri Jun 23 07:23:37 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 22 Jun 2006 22:23:37 -0700 Subject: [Edu-sig] News about turtle graphics In-Reply-To: <449B1B9A.4070405@aon.at> References: <449B1B9A.4070405@aon.at> Message-ID: 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 wrote: > Hi educators! > From delza at livingcode.org Fri Jun 23 12:28:12 2006 From: delza at livingcode.org (Dethe Elza) Date: Fri, 23 Jun 2006 19:28:12 +0900 Subject: [Edu-sig] [edupython] News about turtle graphics In-Reply-To: <449B1B9A.4070405@aon.at> References: <449B1B9A.4070405@aon.at> Message-ID: <24d517dd0606230328x22db3dachd079abfc5470ffcd@mail.gmail.com> 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 in IE, but the performance would definitely take a hit. Great work. I should take a look at Rur-ple now... --Dethe From glingl at aon.at Fri Jun 23 13:02:22 2006 From: glingl at aon.at (Gregor Lingl) Date: Fri, 23 Jun 2006 13:02:22 +0200 Subject: [Edu-sig] [edupython] News about turtle graphics In-Reply-To: <24d517dd0606230328x22db3dachd079abfc5470ffcd@mail.gmail.com> References: <449B1B9A.4070405@aon.at> <24d517dd0606230328x22db3dachd079abfc5470ffcd@mail.gmail.com> Message-ID: <449BCA3E.9050903@aon.at> 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 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 at python.org > http://mail.python.org/mailman/listinfo/edu-sig > > > From kirby.urner at gmail.com Fri Jun 23 15:54:47 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 23 Jun 2006 06:54:47 -0700 Subject: [Edu-sig] [edupython] News about turtle graphics In-Reply-To: <449BCA3E.9050903@aon.at> References: <449B1B9A.4070405@aon.at> <24d517dd0606230328x22db3dachd079abfc5470ffcd@mail.gmail.com> <449BCA3E.9050903@aon.at> Message-ID: 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 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 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 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 > From glingl at aon.at Fri Jun 23 16:16:30 2006 From: glingl at aon.at (Gregor Lingl) Date: Fri, 23 Jun 2006 16:16:30 +0200 Subject: [Edu-sig] [edupython] News about turtle graphics In-Reply-To: References: <449B1B9A.4070405@aon.at> <24d517dd0606230328x22db3dachd079abfc5470ffcd@mail.gmail.com> <449BCA3E.9050903@aon.at> Message-ID: <449BF7BE.8010302@aon.at> 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 > From glingl at aon.at Fri Jun 23 17:07:12 2006 From: glingl at aon.at (Gregor Lingl) Date: Fri, 23 Jun 2006 17:07:12 +0200 Subject: [Edu-sig] [edupython] Re: News about turtle graphics In-Reply-To: <449BFEF3.2010308@canterburyschool.org> References: <449B1B9A.4070405@aon.at> <449BFEF3.2010308@canterburyschool.org> Message-ID: <449C03A0.9020409@aon.at> 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 > From vceder at canterburyschool.org Fri Jun 23 16:47:15 2006 From: vceder at canterburyschool.org (Vern Ceder) Date: Fri, 23 Jun 2006 10:47:15 -0400 Subject: [Edu-sig] [edupython] News about turtle graphics In-Reply-To: <449B1B9A.4070405@aon.at> References: <449B1B9A.4070405@aon.at> Message-ID: <449BFEF3.2010308@canterburyschool.org> 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 at googlegroups.com > To unsubscribe from this group, send email to edupython-unsubscribe at 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 at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 From kirby.urner at gmail.com Fri Jun 23 19:12:45 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 23 Jun 2006 10:12:45 -0700 Subject: [Edu-sig] [edupython] News about turtle graphics In-Reply-To: <449BF7BE.8010302@aon.at> References: <449B1B9A.4070405@aon.at> <24d517dd0606230328x22db3dachd079abfc5470ffcd@mail.gmail.com> <449BCA3E.9050903@aon.at> <449BF7BE.8010302@aon.at> Message-ID: > > 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 "", 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 From glingl at aon.at Sat Jun 24 16:24:50 2006 From: glingl at aon.at (Gregor Lingl) Date: Sat, 24 Jun 2006 16:24:50 +0200 Subject: [Edu-sig] onClick(goto) Message-ID: <449D4B32.9010508@aon.at> Hi all of you! In a previous post I used >>> onClick(goto). No reaction. Hmmm... (perhaps nobody clicked) For those of you, who didn't have the opportunity to look into the xturtle.py package, here is a typical untypical example for the use of xturtle, 25 lines of code, say painter.py: """ A tiny paint program. After startup use mouse-buttons: left - to move pen right - to switch penstate from up to down and vice versa. switching to up begins filling, to down ends (and performs) filling middle - to switch color (you may use different colors for drawing lines and filling) draw and have fun! """ from xturtle import * def switchupdown(x, y): if pen()["pendown"]: end_fill() up() else: down() begin_fill() def changecolor(x, y): colors.append(colors.pop(0)) color(colors[0]) shape("circle") resizemode("user") turtlesize(0.5) width(3) colors=["red", "green", "blue", "yellow"] color(colors[0]) up() onClick(goto,1) onClick(changecolor,2) onClick(switchupdown,3) mainloop() ## comment out if used from within IDLE with -n switch ### end of program I think, this example shows, that fairly simple use of fairly advanced concepts can lead to a fairly funny result. Try it out. Have a nice weekend. Gregor From francois.schnell at gmail.com Sat Jun 24 20:40:42 2006 From: francois.schnell at gmail.com (francois schnell) Date: Sat, 24 Jun 2006 20:40:42 +0200 Subject: [Edu-sig] News about turtle graphics In-Reply-To: <449B1B9A.4070405@aon.at> References: <449B1B9A.4070405@aon.at> Message-ID: <13a83ca10606241140w2bc47cf2xc840a7b19e44ddb1@mail.gmail.com> On 23/06/06, 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. 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: > > http://ada.rg16.asn-wien.ac.at/~python/xturtle 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 at python.org > http://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060624/98793859/attachment.html From kirby.urner at gmail.com Mon Jun 26 02:16:53 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 25 Jun 2006 17:16:53 -0700 Subject: [Edu-sig] Sample Data Structure Message-ID: So here'd be a rich data structure transcribed from Math World: http://mathworld.wolfram.com/news/2003-11-18/magiccube/ Possible lesson plan: use as mapped and indexed data structure to verify we're meeting the requisite criteria for a perfect magic cube of edges 5 cells. magic5 = dict ( square0 = [[25, 16, 80, 104, 90], [115, 98, 4, 1, 97], [42, 111, 85, 2, 75], [66, 72, 27, 102, 48], [67, 18, 119, 106, 5]], square1 = [[91, 77, 71, 6, 70], [52, 64, 117, 69, 13], [30, 118, 21, 123, 23], [26, 39, 92, 44, 114], [116, 17, 14, 73, 95]], square2 = [[47, 61, 45, 76, 86], [107, 43, 38, 33, 94], [89, 68, 63, 58, 37], [32, 93, 88, 83, 19], [40, 50, 81, 65, 79]], square3 = [[31, 53, 112, 109, 10], [12, 82, 34, 87, 100], [103, 3, 105, 8, 96], [113, 57, 9, 62, 74], [56, 120, 55, 49, 35]], square4 = [[121, 108, 7, 20, 59], [29, 28, 122, 125, 11], [51, 15, 41, 124, 84], [78, 54, 99, 24, 60], [36, 110, 46, 22, 101]] ) From glingl at aon.at Mon Jun 26 07:15:54 2006 From: glingl at aon.at (Gregor Lingl) Date: Mon, 26 Jun 2006 07:15:54 +0200 Subject: [Edu-sig] Some thoughts on RurPle / TurTle Message-ID: <449F6D8A.4020807@aon.at> Andre and me, we had an exchange of thoughts on RUR-PLE and xturtle and their respective goals. Perhaps someone might be interested ... On 6/25/06, Gregor Lingl wrote: > Andre Roberge schrieb: > > On 6/25/06, Gregor Lingl wrote: [snip] > > > > As long as you have a look at rur-ple and tell me what you think. ;-) > > > O.k., I had a short look at it, I liked it, especially the very well > designed > user interface. I don't have time now (before my talk at Europython and > before having finished the second edition of my book, which will have > significant changes because it will use my new xturtle) Thanks for taking the time to have a look at it. I understand completely about the lack of time to do everything that one might want to do. > 20 years ago (i mentioned it somewhen) I wrote a Karel descendant > "The very very tiny robot programming system" (in Turbo Pascal) > for an Austrian schoolbook, which of course now is way out of date. > It was a big success then and was used for about 15 years. You are years ahead of me!... I just started this (and only for fun, I don't use it myself as I don't teach) less than 2 years ago. I just noticed your email address (and your reference to Austria) - I had assume you were from Germany. I had the pleasure last year of visiting briefly your country. I took part in a "trade mission" to the town of G?ssing to have a look at the renewable energy infrastructure. I live in a small rural town in Canada and we are thinking of implementing a similar infrastructure here... but that's another story. > In this book Pascal was tought. At the same time in Austria Logo > became popular and I gave seminars for teachers in Logo programming, > and later also for students. > > So I learned both approaches and imo there is one significant difference > between them: The Karel-the-Robot approach has a far more restricted > "universe" than Turtle-Graphics which has a "open universe". This is > reflected > (in Karel, in my tinytiny... as well as in RUR-PLE (how do you pronounce > it?)) > in that they had and have very well designed introductory lessons with very > specific tasks to solve. > 1. I pronounce it like the colour "purple". 2. I totally agree with your statement about "open" vs "closed" universe. I had been thinking of including a "fifth notebook page" within rur-ple, which would have been a turtle graphics one, where the robot world is replaced by a turtle canvas. That being said, I believe that there is an advantage to having a slightly restrictive universe initially. I will explain below. > In contrast to this in the turtle-graphics approach prevails the attitude > to let the students find their own tasks, and the programming environment > must be thus rich that solutions can be found. Therefore I provided > my xtx-examples, which indeed comprise a very broad range of different > problem areas. > > There is one important feature in your RURPLE (as you mentioned > lately) that you do not use a special RURPLE language but Python > (do I rember correctly, that this is also a difference to GvR?), which > I consider a big advantage. This is something I believe in as well. My goal is to provide an introduction to programming which is as "smooth" as possible. We sometime hear the phrase "steep learning curve" to characterize some difficult to grasp concept. I think it is important to have as few "steep learning curves" as possible in the learning process. GvR uses a slightly easier syntax than Python ... but at the expense of having a "step-like learning curve" when one wants to go from GvR's world to Python programming. Since Rur-ple uses Python, there is no transition to speak of. Also, because rur-ple basic instructions [move(), pick_beeper(), put_beeper(), turn_left(), turn_off()] are very limited, they are easier to learn and build from, I think, than the corresponding turtle graphics where one has to contend with arbitrary rotations and arbitrary step lengths right from the start... This is, I believe, one advantage of having a "closed universe", at least at the beginning. What I would like to do (eventually) is to add turtle-like features to rur-ple, with something like move() --> move(length) turn_left() --> turn(angle) and have an open canvas. I think this would combine the best of both worlds. Finally, to go back to the use of Python in rur-ple, I implemented both a procedural approach [move(), turn_left()] as well as an object oriented approach Reeborg = UsedRobot() Reeborg.move() Reebord.turn_left() again with the idea of providing a "smooth" transition to more advanced concepts. I imagine this is what you do with xturtle lessons as well. > I, for my part, now prefer this open approach, where I try to solve > problems that come to my mind with the given tool, if possible, > (if not search for a better tool), instead of devising problems for > a given device - the robot. I agree with having a tool as versatile as possible - and you xturtle is *excellent* in that regard. However, not having had the benefit of reading your book, my *guess* (and it is only a guess) is that the more initially restrictive environment of rur-ple provides an easier learning environment at the very beginning. But I could well be wrong! And I agree with you that, eventually, rur-ple becomes too restrictive (certainly as compared with xturtle). > Example: On June, 22th, the day before I released xturtle.py, > President Bush had a visit in Vienna. He lived in a Hotel approx. > 300 m from my house. Consequently all the streets in this > quarter were blocked and I couldn't leave my house for 24 > hours without going a long way round. In this situation I felt > the wish to produce the peace-logo graphics. It was easily > possible using xturtle and it became the very last xtx-demo. Peace logo: how appropriate! > I definitely feel that both approaches are valuable and can and > should live in parallel. I'm in no way a fundamantalist. (I just had > to decide what approach to use for my book - and there of course > I have to propose lessons in a well designed sequence ...) I think that having different people exploring different approaches may yield better ideas in the end (as long as some communication takes place between the two) > (I wonder if this topic were interesting also for the edu-sig list?) > I think it might be. You have my permission to forward this message directly to the list if you wish, and we can continue this discussion in public, hopefully generating comments from others. > This all said with only a very superfical impression of your system. > Nevertheless I'd be intersted in translating it to German, if nobody > else will undertake it, but i must ask you to understand that I'll > certainly will not have time to do it before September/October. I understand and appreciate the tentative offer of a translation. > I hope that I expressed myself clearly enough - i fear my English is not > elaborate enough for such more 'philosophical' discussions. I believe that your English is just as good as mine, and I feel it is more than adequate to have these type of discussions (however frustrating it might feel when we are looking for the appropriate English idiom to express our thoughts.) And if anyone complains, challenge them to carry a conversation in German if they are not happy! (I'll do the same for French ;-) Thanks for your comments and your xturtle work! Regards, Andr? From glingl at aon.at Mon Jun 26 16:55:23 2006 From: glingl at aon.at (Gregor Lingl) Date: Mon, 26 Jun 2006 16:55:23 +0200 Subject: [Edu-sig] Sample Data Structure In-Reply-To: References: Message-ID: <449FF55B.9000607@aon.at> kirby urner schrieb: > So here'd be a rich data structure transcribed from Math World: > http://mathworld.wolfram.com/news/2003-11-18/magiccube/ > > Possible lesson plan: use as mapped and indexed data structure to > verify we're meeting the requisite criteria for a perfect magic cube > of edges 5 cells. > > magic5 = dict ( > > square0 = > [[25, 16, 80, 104, 90], > [115, 98, 4, 1, 97], > [42, 111, 85, 2, 75], > [66, 72, 27, 102, 48], > [67, 18, 119, 106, 5]], > > I doubt if it is a good choice to use a dictionary here, as this is not an ordered data structure and interchanging the layers of the cube will certainly make the cube imperfect. I suppose a 5 element list would be more appropriate. Regards Gregor > square1 = > [[91, 77, 71, 6, 70], > [52, 64, 117, 69, 13], > [30, 118, 21, 123, 23], > [26, 39, 92, 44, 114], > [116, 17, 14, 73, 95]], > > square2 = > [[47, 61, 45, 76, 86], > [107, 43, 38, 33, 94], > [89, 68, 63, 58, 37], > [32, 93, 88, 83, 19], > [40, 50, 81, 65, 79]], > > square3 = > [[31, 53, 112, 109, 10], > [12, 82, 34, 87, 100], > [103, 3, 105, 8, 96], > [113, 57, 9, 62, 74], > [56, 120, 55, 49, 35]], > > square4 = > [[121, 108, 7, 20, 59], > [29, 28, 122, 125, 11], > [51, 15, 41, 124, 84], > [78, 54, 99, 24, 60], > [36, 110, 46, 22, 101]] > ) > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > > > From francois.schnell at gmail.com Mon Jun 26 19:31:09 2006 From: francois.schnell at gmail.com (francois schnell) Date: Mon, 26 Jun 2006 19:31:09 +0200 Subject: [Edu-sig] Some thoughts on RurPle / TurTle In-Reply-To: <449F6D8A.4020807@aon.at> References: <449F6D8A.4020807@aon.at> Message-ID: <13a83ca10606261031y198359f1q684aca58426e6fab@mail.gmail.com> > > Andre Roberge schrieb: > > Also, because rur-ple basic instructions [move(), pick_beeper(), > put_beeper(), turn_left(), turn_off()] are very limited, they are > easier to learn and build from, I think, than the corresponding turtle > graphics where one has to contend with arbitrary rotations and > arbitrary step lengths right from the start... This is, I believe, > one advantage of having a "closed universe", at least at the > beginning. Personally I disagree. First I was very attracted by Rur-ple sleek look and tested it a month ago. Even if the app itself is great I found I was disturbed with important things for me: - the representation of Rur-ple "world" is from above, with what you call avenues and streets, unfortunately in this representation the robot is represented from the side and you mix this two spatial representations together which I think is miss-leading. Do you think it's possible to be consistent in a future version (as an option ?) : if the world is seen from above the robot is also seen from above in this world (and not from the side). ? - For the sake of simplicity you've decided that the robot can only turn left but never right. For me it makes Rur-ple quite "silly" and above all this apparent "simplicity" (you can't go right) is generating *complexity* quickly. For example if rur-ple want to climb a simple step he must do in your example: --- # climb step turn_left() move() turn_left() turn_left() turn_left() move() move() --- For me It is not simple and intuitive and is by far more difficult than a "Logo" approach. (also even if I build a turn_right() function I'll see Rur-ple going left, left, left ) However, not having had the benefit of > reading your book, my *guess* (and it is only a guess) is that the > more initially restrictive environment of rur-ple provides an easier > learning environment at the very beginning. But I could well be > wrong! I think a robot environment is a valid and a good way to learn Python but I don't agree when you compare Rur-ple as a more powerful alternative to the concepts behind Logo: http://aroberge.blogspot.com/2006/04/thoughts-on-shuttleworth-summit.html The principles behind behind Logo are powerful, it's not just a little turtle to move around to produce graphics. For example you could say to a kid that a circle is "simply" x**2 + y**2 = R**2 ... but with the turtle you can also have a more internal (and "kinesth?sique" representation) by saying that a circle is also: move, turn a little and repeat the same... It gives to a kid an intuition/experience of differential math (essential in science) at a very young age. I really advise people to read/re-read the "mindstorms" book which is essential to understand what are the math and consturctivits concepts behind the turtle: http://el.media.mit.edu/logo-foundation/products/books.html Ok I've finished my "french blood" complaints, sorry for being out-spoken, apart from that I think Rur-ple is great :) francois Peace logo: how appropriate! > > > I definitely feel that both approaches are valuable and can and > > should live in parallel. I'm in no way a fundamantalist. (I just had > > to decide what approach to use for my book - and there of course > > I have to propose lessons in a well designed sequence ...) > > I think that having different people exploring different approaches > may yield better ideas in the end (as long as some communication takes > place between the two) > > > (I wonder if this topic were interesting also for the edu-sig list?) > > > I think it might be. You have my permission to forward this message > directly to the list if you wish, and we can continue this discussion > in public, hopefully generating comments from others. > > > This all said with only a very superfical impression of your system. > > Nevertheless I'd be intersted in translating it to German, if nobody > > else will undertake it, but i must ask you to understand that I'll > > certainly will not have time to do it before September/October. > > I understand and appreciate the tentative offer of a translation. > > > I hope that I expressed myself clearly enough - i fear my English is not > > > elaborate enough for such more 'philosophical' discussions. > > I believe that your English is just as good as mine, and I feel it is > more than adequate to have these type of discussions (however > frustrating it might feel when we are looking for the appropriate > English idiom to express our thoughts.) > > And if anyone complains, challenge them to carry a conversation in > German if they are not happy! (I'll do the same for French ;-) > > Thanks for your comments and your xturtle work! > > Regards, > > Andr? > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060626/7998cfa1/attachment.html From francois.schnell at gmail.com Mon Jun 26 21:35:10 2006 From: francois.schnell at gmail.com (francois schnell) Date: Mon, 26 Jun 2006 21:35:10 +0200 Subject: [Edu-sig] Some thoughts on RurPle / TurTle In-Reply-To: <7528bcdd0606261112s44174b79o759e36712c929607@mail.gmail.com> References: <449F6D8A.4020807@aon.at> <13a83ca10606261031y198359f1q684aca58426e6fab@mail.gmail.com> <7528bcdd0606261112s44174b79o759e36712c929607@mail.gmail.com> Message-ID: <13a83ca10606261235q533ecb95ie4de6b5f212f956f@mail.gmail.com> On 26/06/06, Andre Roberge wrote: > The latest version allows importing arbitrary images for the robot. Great I didn't see that :) It will also require me to draw some "robot viewed from > above" pictures which will stretch even more than before my artistic > abilities! ;-) I'm not an artist either but if I succeed (one day) to make something descent I'll let you know. > - For the sake of simplicity you've decided that the robot can only turn > > left but never right. For me it makes Rur-ple quite "silly" and above > all > > this apparent "simplicity" (you can't go right) is generating > *complexity* > > quickly. > > Again, this was adopted from the original Karel the Robot. The idea > here is to have an "obvious" need to introduce functions early on. > Later, I make use of this when I implement a "better robot" that > inherits from the original one but has been repaired so that it can > turn right directly. Ooops, my apologies, I understand "why" now , I don't like the implications but at least I understand it. > My point, which was perhaps poorly explained, is that rur-ple is meant > as a tool to introduce the whole of Python i.e. it is open ended in > that regards. Yes I think it's a strong point of rur-ple, I also like that in xturtle which give full access to Python. I always viewed Logo as a means to introduce programming within > Logo's environment ... but not really practical outside of this > (unlike Python). I may have been prejudiced due to ignorance there. I don't think Papert is interested at all in Logo as a "language" but only as a possible vehicule for the maths and exploration concepts behind it (to produce "hard-fun" "tools to think with"/ microworlds / differential/kinesthesic approach, etc ). That's why I think it could have a great future with Python inside the "turtles" concepts. > Apart from that, what's left of Rur-ple ? ;-) It was just my opinion but as I said if think the robot approach is very valid and you're doing a great job. Now I understand the left turn only but it seems strange for me : When I was a kid, Japanimation and the Mecha genre invaded France and Italy and it was a huge hit. At Christmas all boys had cool robot toys. I think if we saw a robot which has been designed to turn left only but not right we would have killed and bury him to preserve robots reputation :( I guess I was spoiled ... And as for your "French blood" complaints... I know they are > well-intended and I much prefer to see such public criticism which I > can use as motivation for improvements. And being one of your > cross-Atlantic French cousins myself, I can relate to this direct, > outspoken approach. ;-) Thanks for your explanations and honesty but I guess you also have more diplomatic skills on your side of the Atlantic which is not bad. :) thanks francois Andr? > francois > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060626/2a115b21/attachment.html From kirby.urner at gmail.com Tue Jun 27 04:30:45 2006 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 26 Jun 2006 19:30:45 -0700 Subject: [Edu-sig] More brainstorming in PDX Message-ID: Greetings from jennifer, my edubuntu box in the basement (just loaded some laundry, enjoying the cool of an underground cave -- no central A/C in this house nor even wall units, and it's a record breaking day for A/C in PDX, in terms of consumed megawattage (KOIN News www.koin.com), with a local high of 102F, also record-breaking. At the local supermarket (good A/C in there) I picked up the latest Linux mags and noticed Ruby getting a lot of attention as a kind of "SmallTalk + Perl" (interesting). I did study the Rails system after the last OSCON and understand the appeal of "opinionated platforms" (not all things to all people -- but maybe exactly what *you* need for this job at this time). Python was also showcased in one article: picture of Guido + entrepreneur, around this photo journalism service (online Python webapp). I don't have the mags with me, so won't be able to pin down the reference in this post. I'm mostly @ Math Forum & blogs of late, challenging California's ed standards (a way of sparking debate) and talking up gnu math (Pythonic math is a subclass of this more generic approach to merging OO with more traditional pre-computer notations). I'm not sure how tied I am to OO in the long run, but find Python's concept of namespaces, based on dictionaries (right down to self.__dict__) so satisfyingly consistent, that I'm not inclined to abandon ship any time soon. Closer to home, I continue to work through Wanderers, a local thinktank under the umbrella of isepp.org, recently joined by Glenn Stockton of Global Matrix, David Tver (a mathematician) and others. It's through this group that I landed my paying gig as Pythonic math teacher at the local university (PSU), with an ideal set of young enrollees. I've often used Wanderers as a focus group, when preparing a new Python talk, be that for Linuxfest in Bellingham, a training for local GIS/GPS experts, an OSCON, Pycon, or EuroPython. I'd like to try more adult-centric venues next, so am sorry about not making it to EuroPython this year (mostly young-than-me adults), but maybe next year. More local venues should suffice for field testing. I'll keep ya'll up to date. Kirby From kirby.urner at gmail.com Tue Jun 27 04:40:04 2006 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 26 Jun 2006 19:40:04 -0700 Subject: [Edu-sig] Sample Data Structure In-Reply-To: <449FF55B.9000607@aon.at> References: <449FF55B.9000607@aon.at> Message-ID: > I doubt if it is a good choice to use a dictionary here, as this is not > an ordered data > structure and interchanging the layers of the cube will certainly make > the cube > imperfect. Yes, I think you're right. I was trying to advertise dictionary syntax, but not appropriately in this case. My earlier draft was nested tuples, and I could have stuck with that, but thought it too boring. A more complete module would also have audit code that actually summed all the rows, columns and diagonals, and spit out 315 every time. I've written most of this auditing code, but decided the bare data would be better. Even though it comes as a dict, a quick couple of lines could force a more ordered approach, demonstrating how you don't have to "live with" the data structure another programmer chose, if you can think of a better one. An important lesson. xTurtle is way cool by the way. I've got the __init__.py to make it a package. It could go in the standard library directory that way, for a Pythonic edudistro. Kirby From da.ajoy at gmail.com Tue Jun 27 05:13:46 2006 From: da.ajoy at gmail.com (Daniel Ajoy) Date: Mon, 26 Jun 2006 22:13:46 -0500 Subject: [Edu-sig] Some thoughts on RurPle / TurTle In-Reply-To: Message-ID: <44A05C1A.6224.3F4C5EB9@da.ajoy.gmail.com> On 27 Jun 2006 at 4:30, edu-sig-request at python.org wrote: > > I always viewed Logo as a means to introduce programming within > > Logo's environment ... but not really practical outside of this > > (unlike Python). I may have been prejudiced due to ignorance there. > > I don't think Papert is interested at all in Logo as a "language" > but only as a possible vehicule for the maths and exploration > concepts behind it (to produce "hard-fun" "tools to think with"/ > microworlds / differential/kinesthesic approach, etc ). That's > why I think it could have a great future with Python inside the > "turtles" concepts. I'm guessing that you are correct in this. Papert has never shown much interest in Logo as a language. I've only seen him write to the LogoForum once (a couple of weeks ago) and in the OLPC project he is not pushing for Logo in it, but has started a section in the wiki called "Learning learning". Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060626/81a3e150/attachment.html From da.ajoy at gmail.com Tue Jun 27 05:15:04 2006 From: da.ajoy at gmail.com (Daniel Ajoy) Date: Mon, 26 Jun 2006 22:15:04 -0500 Subject: [Edu-sig] (Fwd) Re: Some thoughts on RurPle / TurTle Message-ID: <44A05C68.5575.3F4D8F5A@da.ajoy.gmail.com> ------- Forwarded message follows ------- From: Daniel Ajoy To: edu-sig-request at python.org Subject: Re: [Edu-sig] Some thoughts on RurPle / TurTle Date sent: Mon, 26 Jun 2006 21:48:21 -0500 On 26 Jun 2006 at 12:00, edu-sig-request at python.org wrote: > Also, because rur-ple basic instructions [move(), pick_beeper(), > put_beeper(), turn_left(), turn_off()] are very limited, they are > easier to learn and build from, I think, than the corresponding turtle > graphics where one has to contend with arbitrary rotations and > arbitrary step lengths right from the start... This is, I believe, > one advantage of having a "closed universe", at least at the > beginning. What I would like to do (eventually) is to add > turtle-like features to rur-ple, with something like > move() --> move(length) > turn_left() --> turn(angle) > and have an open canvas. I think this would combine the best of both > worlds. Instead of yet another turtle graphics implementation I wish it added features of PC-Robots: http://www.informatik.uni-frankfurt.de/~hbecker/pcrob.html PCRobots is a programming game written by P. D. Smith. It's sort of a tank game, the tanks have to fight each other. But you can't control your tank: It is controlled by a programm you have to write! The best program wins. PCRobots is very easy to handle: You can use most (DOS) compilers to create your robots. Robots can build teams, different maps (with obstacles) can be used, PCRobots has a graphical display and even some sound. You can download the game from here: http://www.informatik.uni-frankfurt.de/~hbecker/prg/pcrob141.zip and read some of the details in the manual: PCROBOTS.DOC a text file. I did enjoy playing with it in 1998 when I taught a first year programming course using PCRobots and Turbo C. Daniel ------- End of forwarded message ------- From da.ajoy at gmail.com Tue Jun 27 05:15:04 2006 From: da.ajoy at gmail.com (Daniel Ajoy) Date: Mon, 26 Jun 2006 22:15:04 -0500 Subject: [Edu-sig] (Fwd) Re: Some thoughts on RurPle / TurTle Message-ID: <44A05C68.12176.3F4D8E9E@da.ajoy.gmail.com> ------- Forwarded message follows ------- From: Daniel Ajoy To: edu-sig-request at python.org Subject: Re: Some thoughts on RurPle / TurTle Date sent: Mon, 26 Jun 2006 21:55:46 -0500 On 26 Jun 2006 at 12:00, edu-sig-request at python.org wrote: > > Example: On June, 22th, the day before I released xturtle.py, > > President Bush had a visit in Vienna. He lived in a Hotel approx. > > 300 m from my house. Consequently all the streets in this > > quarter were blocked and I couldn't leave my house for 24 > > hours without going a long way round. In this situation I felt > > the wish to produce the peace-logo graphics. It was easily > > possible using xturtle and it became the very last xtx-demo. > > Peace logo: how appropriate! Someone else had the same idea. You were late by 35 years :) (images attached) ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-249.pdf Daniel ------- End of forwarded message ------- -------------- next part -------------- The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance. ---- File information ----------- File: peace1.gif Date: 26 Jun 2006, 21:53 Size: 3355 bytes. Type: GIF-image -------------- next part -------------- A non-text attachment was scrubbed... Name: peace1.gif Type: image/gif Size: 3355 bytes Desc: not available Url : http://mail.python.org/pipermail/edu-sig/attachments/20060626/e6c6160c/attachment-0002.gif -------------- next part -------------- The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance. ---- File information ----------- File: peace2.gif Date: 26 Jun 2006, 21:53 Size: 10024 bytes. Type: GIF-image -------------- next part -------------- A non-text attachment was scrubbed... Name: peace2.gif Type: image/gif Size: 10024 bytes Desc: not available Url : http://mail.python.org/pipermail/edu-sig/attachments/20060626/e6c6160c/attachment-0003.gif From glingl at aon.at Tue Jun 27 19:08:48 2006 From: glingl at aon.at (Gregor Lingl) Date: Tue, 27 Jun 2006 19:08:48 +0200 Subject: [Edu-sig] Sample Data Structure In-Reply-To: References: <449FF55B.9000607@aon.at> Message-ID: <44A16620.9060506@aon.at> kirby urner schrieb: >> I doubt if it is a good choice to use a dictionary here, as this is not >> an ordered data >> structure and interchanging the layers of the cube will certainly make >> the cube >> imperfect. > > Yes, I think you're right. I was trying to advertise dictionary > syntax, but not appropriately in this case. My earlier draft was > nested tuples, and I could have stuck with that, but thought it too > boring. > > A more complete module would also have audit code that actually summed > all the rows, columns and diagonals, and spit out 315 every time. > > I've written most of this auditing code, but decided the bare data > would be better. > I did a similar thing, deciding to use a flat list. If one used the flat list *and* the (given) nested one(s) one could make the code even more compact. My solution goes like this: from operator import __and__ magic5 = [ [[25, 16, 80, 104, 90], [115, 98, 4, 1, 97], [42, 111, 85, 2, 75], [66, 72, 27, 102, 48], [67, 18, 119, 106, 5]], [[91, 77, 71, 6, 70], [52, 64, 117, 69, 13], [30, 118, 21, 123, 23], [26, 39, 92, 44, 114], [116, 17, 14, 73, 95]], [[47, 61, 45, 76, 86], [107, 43, 38, 33, 94], [89, 68, 63, 58, 37], [32, 93, 88, 83, 19], [40, 50, 81, 65, 79]], [[31, 53, 112, 109, 10], [12, 82, 34, 87, 100], [103, 3, 105, 8, 96], [113, 57, 9, 62, 74], [56, 120, 55, 49, 35]], [[121, 108, 7, 20, 59], [29, 28, 122, 125, 11], [51, 15, 41, 124, 84], [78, 54, 99, 24, 60], [36, 110, 46, 22, 101]] ] def flatten(lol): flat = [] for l in lol: flat.extend(l) return flat ## This approach - using slices - operates best with a flat list def msq(s): return reduce(__and__, ( [sum(s[i:i+5])==315 for i in range(0,25,5)] + [sum(s[i:25:5])==315 for i in range(5)] + [sum(s[0:25:6])==315, sum(s[4:21:4])==315])) def magic(cube): sq=flatten([flatten(sq) for sq in cube]) return reduce(__and__, ( [msq(sq[i:i+25]) for i in range(0,125,25)] + [msq(sq[i:125:5]) for i in range(5)] + [msq(flatten([sq[i+j:i+j+5] for i in range(0,125,25)])) for j in range(0,21,5)] + [sum(s)==315 for s in [sq[0:125:31],sq[20:105:21],sq[4:121:29],sq[24:101:19]]])) print magic(magic5) # I wonder how it will look like with a 3-dimensional list Regards, Gregor From francois.schnell at gmail.com Wed Jun 28 20:02:12 2006 From: francois.schnell at gmail.com (francois schnell) Date: Wed, 28 Jun 2006 20:02:12 +0200 Subject: [Edu-sig] (Fwd) Re: Some thoughts on RurPle / TurTle In-Reply-To: <44A05C68.5575.3F4D8F5A@da.ajoy.gmail.com> References: <44A05C68.5575.3F4D8F5A@da.ajoy.gmail.com> Message-ID: <13a83ca10606281102s2532bbf6vd102b7a845250741@mail.gmail.com> On 27/06/06, Daniel Ajoy wrote: > > > PCRobots is a programming game written by P. D. Smith. It's sort > of a tank game, the tanks have to fight each other. But you can't > control your tank: It is controlled by a programm you have to write! > The best program wins. Hello, I never tried it (yet) but Java people seem to have taken this idea too: " Is it possible to learn inheritance, polymorphism, event handling, and inner classes, all while dodging bullets and executing precision attack maneuvers? A surprisingly addictive teaching-tool-turned-game-craze called Robocode is about to make this a reality for Java developers worldwide. Follow along as Sing Li disarms Robocode and starts you on your way to building your own customized lean, mean, fighting machine. " http://www-128.ibm.com/developerworks/java/library/j-robocode/index.html http://robocode.sourceforge.net/ francois PCRobots is very easy to handle: You can use most (DOS) compilers > to create your robots. Robots can build teams, different maps (with > obstacles) can be used, PCRobots has a graphical display and even > some sound. > > You can download the game from here: > > http://www.informatik.uni-frankfurt.de/~hbecker/prg/pcrob141.zip > > and read some of the details in the manual: > > PCROBOTS.DOC > > a text file. > > I did enjoy playing with it in 1998 when I taught a first year > programming course using PCRobots and Turbo C. > > Daniel > > ------- End of forwarded message ------- > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060628/8a614bef/attachment.html From kirby.urner at gmail.com Wed Jun 28 23:25:09 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 28 Jun 2006 14:25:09 -0700 Subject: [Edu-sig] (Fwd) Re: Some thoughts on RurPle / TurTle In-Reply-To: <13a83ca10606281102s2532bbf6vd102b7a845250741@mail.gmail.com> References: <44A05C68.5575.3F4D8F5A@da.ajoy.gmail.com> <13a83ca10606281102s2532bbf6vd102b7a845250741@mail.gmail.com> Message-ID: > " Is it possible to learn inheritance, polymorphism, event handling, and > inner classes, all while dodging bullets and executing precision attack > maneuvers? A surprisingly addictive teaching-tool-turned-game-craze called > Robocode is about to make this a reality for Java developers worldwide. > Follow along as Sing Li disarms Robocode and starts you on your way to > building your own customized lean, mean, fighting machine. " > > http://www-128.ibm.com/developerworks/java/library/j-robocode/index.html > http://robocode.sourceforge.net/ > > francois Yes, I'm pretty sure Robocode is one of those being field tested by Saturday Academy, although not in my classes so far (I checked it out on my own time though, eyeballed some of the Java). I'd be in the market for something similar, although I'd like a more introspective Turtle and more psychological challenges, ala the Zoombini series, Myst and Uru. I think what's happening is Python's edu-siggers are persuasively demonstrating that entire Logolike robotic play worlds are within reach of a solo coder. They work actually pretty much as advertised, come with documentation and demos, plus you get to study their inner workings and learn from a potential peer (an ideal combination). The overview experience one gets from rolling one's own, better qualifies one for project management positions when a larger team shows up, ready to recode it in OpenGL or whatever, with high def Turtles swimming amidst colorful corals, looking for Nemo, avoiding natural predators or whatever. In other words: as I learned long ago, the solo developer is quickly outclassed by what teamwork can do, when it comes to finalizing a commercial and/or educational product. We've discussed this several times on this list, in connection with game development. In my own career, I couldn't compete with the corporate spin-offs from the likes of my CORIS and CLAIR (inhouse cardiology apps). I've never been much of a game developer (but I did use PyGame to write myself an open source PowerPoint alternative). Some people misconstrue the open source revolution as a battle against large companies, but that's not the case. What IBM is doing for Linux is huge, and not because SCO thinks it owns the Unix brand name (what could be more irrelevant?). But on the other hand, there's no substitute for rolling one's own, and how one gets to be on these high powered teams, is by wrapping one's head around the problem, and publishing solutions, even if just in pseudo-code. In an already big project, building credibility may involve simply submitting small patches (you need overview for that too, where multiple dependencies are involved). But a lot of times, one just goes for green field development, per the recent Pata Pata example. Show what you're capable of, advertise your skills as a lone hacker, have emacs will code. People think: wow, what return could we get with more people like this on our payroll? A lot, I would expect. The Python community is overflowing with skilled people. And the meme pool is set to expand even more, as a new generation starts hacking on cell phones. Python: the full monty for mobile applications Victor Keegan Thursday June 22, 2006 http://technology.guardian.co.uk/opinion/story/0,,1802590,00.html (my thanks to Phillip for the heads up on this one). Kirby From bmiller at luther.edu Thu Jun 29 00:48:02 2006 From: bmiller at luther.edu (Brad Miller) Date: Wed, 28 Jun 2006 17:48:02 -0500 Subject: [Edu-sig] News about turtle graphics In-Reply-To: <449B1B9A.4070405@aon.at> References: <449B1B9A.4070405@aon.at> Message-ID: <4756680ce8afe3ad436f65089845f701@luther.edu> 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 at 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 at jabber.org From pdfernhout at kurtz-fernhout.com Thu Jun 29 03:22:59 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Wed, 28 Jun 2006 21:22:59 -0400 Subject: [Edu-sig] PataPata 0.1.19 release & Stigmergy In-Reply-To: References: <44A05C68.5575.3F4D8F5A@da.ajoy.gmail.com> <13a83ca10606281102s2532bbf6vd102b7a845250741@mail.gmail.com> Message-ID: <44A32B73.2090707@kurtz-fernhout.com> kirby urner wrote: > In other words: as I learned long ago, the solo developer is quickly > outclassed by what teamwork can do, when it comes to finalizing a > commercial and/or educational product. We've discussed this several > times on this list, in connection with game development. How often true... "Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it's the only thing that ever has." -- Margaret Mead > But a lot of times, one just > goes for green field development, per the recent Pata Pata example. Well, it's somewhat green, but as mentioned before, I'm building on the shoulders of giants. :-) I've been pretty quiet on edusig as I've been hard at work. :-) SourceForge is partially down right now so I can't make a proper release in response to your mention :-) but I just added PataPata_v119.zip (version 0.1.19) to SVN here: http://svn.sourceforge.net/viewcvs.cgi/patapata/trunk/releases/PataPata_v119.zip?view=log You can download from that web page. This version includes the current release of Gregor Lingl's xturtle library, wrapped as a Morph. (I modified the library slightly to work with Python 2.3). To run the demo (after unzipping the file) use: python PataPata.py It even has some PythonCard compatibility. It can read PythonCard resource files and build GUIs for them -- if the widgets are from the limited set it supports (Button, CheckBox, TextField, TextArea, Menus, and a few others). You still have to link in the code by hand though. I converted one example -- the "conversions" sample which converts temperatures, currencies, and Morse code. I also converted the menu builder tool GUI but it has no functionality yet. (Limited) PythonCard compatibility motivated several major improvements in the system (including naming morphs and supporting menus and a "visible" flag). There is also one example using the approach Ian Bicking outlined previously here of using metaclasses to read in prototypes defined using "class". Also included is an example of how it works just using regular python code to construct them, so one can compare the two. It still uses the old approach for writing as I explore the new (for me) idea. There is also a webcast Francois Schnell made of PataPata on ShowMeDo: http://showmedo.com/videos/video?name=patapata_tkinter1_fSchnell So, see, some teamwork going on, though of an "artifact mediated" kind. I think of that as a form of "Stigmergy". http://en.wikipedia.org/wiki/Stigmergic From there: "Stigmergy is a method of communication in emergent systems in which the individual parts of the system communicate with one another by modifying their local environment." --Paul Fernhout From kirby.urner at gmail.com Thu Jun 29 04:29:46 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 28 Jun 2006 19:29:46 -0700 Subject: [Edu-sig] PataPata 0.1.19 release & Stigmergy In-Reply-To: <44A32B73.2090707@kurtz-fernhout.com> References: <44A05C68.5575.3F4D8F5A@da.ajoy.gmail.com> <13a83ca10606281102s2532bbf6vd102b7a845250741@mail.gmail.com> <44A32B73.2090707@kurtz-fernhout.com> Message-ID: On 6/28/06, Paul D. Fernhout wrote: > "Never doubt that a small group of thoughtful, committed citizens can > change the world; indeed, it's the only thing that ever has." -- Margaret Mead > Or committed company employees, or crew members, or television screen writers... > it has no functionality yet. (Limited) PythonCard compatibility motivated > several major improvements in the system (including naming morphs and > supporting menus and a "visible" flag). I wonder if you've contacted Kevin Altis, the PythonCard developer I know best. Robin Dunn, author of wxPython is also local (we've met many times). I saw the new wx book at Powell's Technical, and almost bought it (I'm waiting for a bigger book budget to materialize, so I might expand my library). > So, see, some teamwork going on, though of an "artifact mediated" kind. I > think of that as a form of "Stigmergy". > http://en.wikipedia.org/wiki/Stigmergic Wow, I'd never have guessed. Same root as stigmata, no? Maybe not. > From there: "Stigmergy is a method of communication in emergent systems > in which the individual parts of the system communicate with one another > by modifying their local environment." > > --Paul Fernhout So like when I mow my lawn in a certain pattern, signalling a satellite, or when ETs use a crop circle to phone home, right? Science fiction examples of "stigging out" (slang for "exercising stigmergic abilities"). Kirby From glingl at aon.at Thu Jun 29 17:06:58 2006 From: glingl at aon.at (Gregor Lingl) Date: Thu, 29 Jun 2006 17:06:58 +0200 Subject: [Edu-sig] News about turtle graphics In-Reply-To: <4756680ce8afe3ad436f65089845f701@luther.edu> References: <449B1B9A.4070405@aon.at> <4756680ce8afe3ad436f65089845f701@luther.edu> Message-ID: <44A3EC92.7040607@aon.at> 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 > From pdfernhout at kurtz-fernhout.com Fri Jun 30 01:58:15 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Thu, 29 Jun 2006 19:58:15 -0400 Subject: [Edu-sig] PataPata 0.1.19 release & Stigmergy In-Reply-To: References: <44A05C68.5575.3F4D8F5A@da.ajoy.gmail.com> <13a83ca10606281102s2532bbf6vd102b7a845250741@mail.gmail.com> <44A32B73.2090707@kurtz-fernhout.com> Message-ID: <44A46917.9060003@kurtz-fernhout.com> kirby urner wrote: > Or committed company employees, or crew members, or television screen writers... Good point. By the way, SourceForge is finally allowing logins again, so there is now a proper release here: http://sourceforge.net/project/showfiles.php?group_id=165910 > I wonder if you've contacted Kevin Altis, the PythonCard developer I > know best. Robin Dunn, author of wxPython is also local (we've met > many times). I saw the new wx book at Powell's Technical, and almost > bought it (I'm waiting for a bigger book budget to materialize, so I > might expand my library). To be clear, it is limited PythonCard compatibility, but it is using TK to achieve that, not WX. Eventually, I hope to improve the wx GUI, but the TK one is more advanced right now and the PythonCard compatibility is built on that. So, you can take your PythonCard resources (simple ones) and build TK GUIs with them (at least, as far as laying out widgets, connecting code still needs to be done by hand, and automating that is not a priority for me, if it would be doable at all given various issues). It's a tribute to PythonCard's modular design of using a resource file that I was able to do this with PataPata. The basic difference between PythonCard and PataPata is that PythonCard seems focused on helping you develop GUI-oriented Python applications faster and in a more maintainable way, whereas PataPata attempts to give you a live world of Python objects where some of those objects are Morphs and non-visual Prototypes. Still, I'd expect the PythonCard project might not like a "competitor"? :-) I'm all for friendly competition of course -- but the reality is there are only so many volunteer developers to go around at any specific time, so if PataPata picked up some I would expect PythonCard might lose some. Certainly I could have tried to improve PythonCard rather than make something different. On the other hand, sometimes when something becomes popular, say building GUIs in Python, then everyone benefits (say if VB and Ruby and PHP developers switch to Python and either PythonCard or PataPata). In the PythonCard case, since it is under a more permissive license (BSD-ish) than PataPata (GPL) they do address different audiences. >>So, see, some teamwork going on, though of an "artifact mediated" kind. I >>think of that as a form of "Stigmergy". >> http://en.wikipedia.org/wiki/Stigmergic > > > Wow, I'd never have guessed. Same root as stigmata, no? Maybe not. Never thought of that. On etymology: From: http://www.answers.com/topic/stigmata "stigmata ... [plural of stigma, from Gr.,=brand]" From: http://stigmergiccollaboration.blogspot.com/2006_05_01_stigmergiccollaboration_archive.html "Below are some variations on the terms origins (see the [poster for references): * ?stigma? (goad) and ?ergon? (work)?? to ??stigmergy (stigma: Wound from a pointed object; ergon: Work, product of labour = stimulating product of labour). * from the Greek words stigma ?sign? and ergon ?action,? and captures the notion that an agent?s actions leave signs in the environment, signs that it and other agents sense and that determine their subsequent actions. * [F]rom the Greek stigma: sting, and ergon: work." So actually related in some sense I guess. >> From there: "Stigmergy is a method of communication in emergent systems >> in which the individual parts of the system communicate with one another >> by modifying their local environment." > So like when I mow my lawn in a certain pattern, signalling a > satellite, or when ETs use a crop circle to phone home, right? > Science fiction examples of "stigging out" (slang for "exercising > stigmergic abilities"). Not quite the same, though interesting examples to work with. The point of the individual or group stigmergic activity is not generally explicitly to signal, which is what you give examples of -- people intending to send a communication, but just doing it by making a large physical artifact. Rather, the idea is that each actor does something that feels good to them to improve their local environment, and other actors then build on their work in some way, or connect their own independent work to the others work on recognizing it. So the cooperation is mediated through the artifact, but the artifact itself isn't necessarily intended as a signal (though it could be). For a better example, it would be like your neighbor sees you mow part of a crop circle in your cornfield, and they then decide to mow another part of a circle along the same arc which joins up with yours because it feels right, and so on, until soon your community has got a really big circle around the whole neighborhood someone really could see from space. In the PataPata example, Gregor wasn't writing xturtle for PataPata, and PataPata wasn't written to host xturtle, but it turns out the two things can be used together. That is more like stigmergy in termite mound building, where termites mill around building little stacks of grains of sand, until finally two stacks accidentally lean on each other to make an arch, and then other termites get excited and start building stacks next to it to make other arches, which makes a tunnel, and so on to make a nest (pheromones applied to the constructions are also involved here as additional signals). The idea of stigmergy is that there is no central blue print (though there may be shared useful behavior) and that there is no central signaling architect or supervisor so the overall organic structure emerges from the individual local actions (or sometimes local signals) of those involved. Maybe it would be kind of like people building geodesic domes by someone fiddling with some construction materials and then making a triangle, and then other people getting excited and making triangles and linking them up to the first triangle, and then a whole dome somehow going up. Now, this may not work with dome in reality, I do not know, but the general idea is this building mediated by the artifact as the signal, not by plans or other chatter as signals. Perhaps think of it this way -- a bunch of people who are deaf, blind, and mute building a geodesic dome by just helping each other add parts? So, for another example, I and Kevin have never talked that I can recall, but I am building on his good work in PythonCard by looking at what fields and events it defines and using PythonCard samples as motivating use cases for PataPata functionality. Then in turn someone may build on ideas from PataPata (like PataPata is also built on ideas from Squeak and Self). So, collaboration by experiencing artifacts more than by talking. Now having said that, talking is still very useful lots of times. Ian took the time to get me to outline a way to use metaclasses to define prototypes, and Francois took the time to make some nice webcasts where he explains how to use PataPata. But again, these activities, while involving signaling, weren't exactly planned. Nobody told Francois what to do, and no one scheduled Ian and myself getting together for a meeting about prototypes. So, some emergent behavior is there as well, mediated by this mailing list around some common interests related to Python and education. --Paul Fernhout From pdfernhout at kurtz-fernhout.com Fri Jun 30 07:56:00 2006 From: pdfernhout at kurtz-fernhout.com (Paul D. Fernhout) Date: Fri, 30 Jun 2006 01:56:00 -0400 Subject: [Edu-sig] News about turtle graphics In-Reply-To: <449B1B9A.4070405@aon.at> References: <449B1B9A.4070405@aon.at> Message-ID: <44A4BCF0.4040505@kurtz-fernhout.com> 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/WorldWithXTurtlePC.py?view=markup 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.py?view=markup 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