From jmillr at umich.edu Mon Nov 1 21:42:35 2004 From: jmillr at umich.edu (John Miller) Date: Mon Nov 1 21:42:44 2004 Subject: [Edu-sig] Re: Whither PyGeo? In-Reply-To: <20041030100003.B4C401E400C@bag.python.org> References: <20041030100003.B4C401E400C@bag.python.org> Message-ID: <90083DDA-2C46-11D9-A861-000A95B5BA08@umich.edu> I've never had the opportunity to play with PyGeo, partly because there wasn't a particular need to, and partly because I was waiting for it to arrive at a newer release state. However, there is a *possibility* (not yet even a probability) that I'll be able to begin teaching beginning Python programming to middle schoolers either in Feb. or Sept. 2005. So, I'm casting about for materials to use, and PyGeo would definitely be on my list if Arthur were able to whip it into shape for release. So, this message is meant primarily as one of encouragement to make a newer version available that incorporates all of its improvements. But also I'm wondering if there are any underlying issues with PyGeo, as it's evolved, that would benefit from a discussion here? (I guess I'm primarily wondering about its suitability for younger beginning programmers, its API, etc.) John Miller On Oct 30, 2004, at 6:00 AM, Arthur wrote: > Just thought I'd throw out a Python success/failure story. > > The failure part: > > Have not gotten it together to issue a new release of PyGeo for almost > 2 > years. Not that I haven't been tinkering with it constantly, and > working on > some other essentials like decent docs, etc. And not that I still don't > think it's cool (and gotten significantly cooler). But it ain't there > yet. > > The success part: > > The main reason I have not had to time to polish off a release of > PyGeo is > not surprising - I gotta make a buck, and that has to take priority, > and > that takes time. The surprising part, to me, is how I'm making a buck > these > days - largely as a developer. Which is a pretty full circle mid-life > career > change that I seem to have pulled off. I'll never be a developer in the > sense that many in the Python community are. But I've pulled off some > decent stuff where the problem domain was financial. I seem to able to > compensate for modest development skills with strong background in > business > financial issues, and have as a result developed a word-of-mouth > freelance > development practice successful enough to keep me away from much time > at > PyGeo, but with a family fed. > > And while I do not develop in Python professionally - most of the > skills > I've developed, I've developed in Python. And any code I'm writing, I'm > thinking in Python, and translating as necessary. > > Thought I owed Python at least that little testimonial. > > Art From kent37 at tds.net Mon Nov 1 22:24:56 2004 From: kent37 at tds.net (Kent Johnson) Date: Mon Nov 1 22:25:00 2004 Subject: [Edu-sig] Intro to Python course - followup In-Reply-To: <90083DDA-2C46-11D9-A861-000A95B5BA08@umich.edu> References: <20041030100003.B4C401E400C@bag.python.org> <90083DDA-2C46-11D9-A861-000A95B5BA08@umich.edu> Message-ID: <4186A9A8.1090200@tds.net> I am teaching "Introduction to Programming with Python" with a local adult ed program. Here is a status report: There are seven students in the course, five women and two men, ranging in age from (my guess) late 20's to early 60's. Most of them have some previous programming experience, mostly long ago and far away. One of them is a refugee from a C++ class. I am using "Python Programming for the absolute beginner" as the text. I think this was a good choice. The students seem to like and understand the book and they are able to do the exercises. I like the level of detail in the book; it is enough to do real work but not overwhelming. I have been following the presentation in the book pretty closely, partly because it is a lot less work for me, but also because the book is well thought out and consistently builds on what has gone before. We cover one chapter a week. I have taught five two-hour classes so far. We have covered through chapter 5, Lists and Dictionaries. The last class was great! I had quite a few notes from the chapter and was worried that I wouldn't get through them, but the class got it quickly and we went into some more advanced material. I did a lot of work with list comprehensions and even showed them compound data structures (lists of tuples, dicts mapping string to list) and decorate-sort-undecorate. The best part of the class for me was to see the students catch on to how cool Python is. They were smiling and getting it. I honestly don't know how much they will retain of the more advanced material but for them to get a hint of how easy it is to work with data structures in Python was great. The best student has written a real program already (a program that does something he cares about). It reads a CSV file and makes a consolidated index. It's pretty simple stuff but he figured out the file part and a simple CSV parser on his own. I showed him the csv module and he thought that would be very useful for other programs. At the end of the class last week, after I demonstrated some particularly over-the-top bit of Python coolness, this student was thunderstruck. I wasn't sure if I had finally lost him, or if he was just blown away by how cool it was, so I asked him. He was blown away :-)) We're talking slack-jawed, slumped-back-in-the-seat amazement, folks! I'm having a great time, too. I definitely want to do this again, maybe I will try a course for experienced programmers next time. Kent From urnerk at qwest.net Mon Nov 1 22:46:50 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Nov 1 22:46:52 2004 Subject: [Edu-sig] Intro to Python course - followup In-Reply-To: <4186A9A8.1090200@tds.net> Message-ID: <20041101214652.2A42C1E4002@bag.python.org> > I'm having a great time, too. I definitely want to do this again, maybe > I will try a course for experienced programmers next time. > > Kent Thanks for the report Kent. Very encouraging and inspiring. Keep up the good work! Kirby From ajsiegel at optonline.net Tue Nov 2 10:13:56 2004 From: ajsiegel at optonline.net (Arthur) Date: Tue Nov 2 14:31:46 2004 Subject: [Edu-sig] re: Whither PyGeo Message-ID: <1099386836.6993.35.camel@localhost.localdomain> John writes >I've never had the opportunity to play with PyGeo, partly because there >wasn't a particular need to, and partly because I was waiting for it to >arrive at a newer release state. However, there is a *possibility* (not >yet even a probability) that I'll be able to begin teaching beginning >Python programming to middle schoolers either in Feb. or Sept. 2005. >So, I'm casting about for materials to use, and PyGeo would definitely >be on my list if Arthur were able to whip it into shape for release. Not if. When :) >So, this message is meant primarily as one of encouragement to make a >newer version available that incorporates all of its improvements. But >also I'm wondering if there are any underlying issues with PyGeo, as >it's evolved, that would benefit from a discussion here? (I guess I'm >primarily wondering about its suitability for younger beginning >programmers, its API, etc.) Its API is simple enough. Its educational value for younger beginning programmers less clear. On the plus side, I think it gives them a context they may already have some grounding in, in which to experiment. But that context is geometry - which, incredibly, some folks might find yucky. I would argue that geometry has some legs as foundational in education. And that until someone comes up with something convincing as the foundational educational concept of the New Millenium, that we might give some serious consideration to sticking with the classics. And I would argue that there is a connection between geometry, as the classical foundation of logical reasoning, and programming, as its (or "a") productive modern incarnation, that is profound and intriguing - and that while young folks might not explicitly understand the connection I am trying to make here, I am hoping that at some level they might *feel* it. With he added self-referential factor, that in working on computer screens, on is working within the land of applied geometry/programming. I'm an old Literature major. For things to work, they need to work at different levels, simultaneously. That said, all that is fully clear about PyGeo's educational value, and said with any confidence, is not dissimilar to that of many such projects. The educational value of building it has been profound. But I've hogged that, I'm afraid. FWIW, the greatest challenge I face it getting it out there in a way its potential might be fairly explored are cross platform packaging and distribution issues. I won't go into the details of what I see as the issues. I will say/announce that I have decided to take a clue from Mark Shuttleworth and offer a $ bounty to anyone with the right background who would willing to assist me here. Anyone interested in discussing this can contact me either through the list or privately at ajsiegel@optonline.com. Thanks John for giving me the opportunity to expand a bit on a favorite topic. Art From urnerk at qwest.net Tue Nov 2 19:50:54 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Nov 2 19:50:57 2004 Subject: [Edu-sig] Kirby's current Python gigs In-Reply-To: <4186A9A8.1090200@tds.net> Message-ID: <20041102185055.6462B1E4007@bag.python.org> > I am teaching "Introduction to Programming with Python" with a local > adult ed program. Here is a status report: > Just thought I'd mention my various teaching gigs re Python: I'm the adult mentor at my daughter's public school, meaning I show up on Fridays (not every Friday) around noon and serve as a resource person. Python is already installed on all the computers in the lab (which is where I'm stationed). My special assignment is to help a 3rd grader, who has already stuffed his head with a ton of computer related stuff (I've not met him yet), but could use some mentoring/focus. I'm also standing by to mentor an 8th grader, pursuant to our successful meeting at a coffee shop with him and his dad. He's already self-taught himself come C, Java, Perl. I'm hoping Python will be his best experience yet. In January, I'm scheduled to teach a math-through-programming course at Oregon Graduate Institute, with mostly high schoolers signed up. This is through a local university-based academy with a long track record and a lot of name recognition around here. This'll be their first venture into Python. Jerritt Collord and I did 'Adventures in Open Source' through this academy in June, at a police station (Linux Lab at West Precinct HPD). That featured some Python too, but this January course has Python in the title. Other gigs may be shaping up on the horizon, but these are the ones I currently feel are pretty solid commitments that I've made. I'll be hoping to discuss each of these assignments with my peers on edu-sig as time goes on (as Kent is doing, others). That's very much part of the purpose of this list, per the write-up at .../sigs/edu-sig/. I'm especially interested in the assignment to mentor a 3rd grader. That seems very young to me. The stuff I cover with 8th graders and up won't necessarily be appropriate, at least not in the same form. I think it'd be good if I could find a peer close to his age, with similar interests, so they could bounce off each other. I don't want programming to seem too lonely or solitary a venture for someone starting out that early, given programming potentially involves a lot of collaboration, team work, inter-personal communications. Kirby From anna at aleax.it Fri Nov 5 08:26:39 2004 From: anna at aleax.it (Anna Martelli Ravenscroft) Date: Fri Nov 5 08:26:48 2004 Subject: [Edu-sig] Intro to Python course - followup In-Reply-To: <4186A9A8.1090200@tds.net> References: <20041030100003.B4C401E400C@bag.python.org> <90083DDA-2C46-11D9-A861-000A95B5BA08@umich.edu> <4186A9A8.1090200@tds.net> Message-ID: <418B2B2F.6050500@aleax.it> Kent Johnson wrote: > I am teaching "Introduction to Programming with Python" with a local > adult ed program. Here is a status report: > > There are seven students in the course, five women and two men, ranging > in age from (my guess) late 20's to early 60's. Most of them have some > previous programming experience, mostly long ago and far away. One of > them is a refugee from a C++ class. > > I am using "Python Programming for the absolute beginner" as the text. I > think this was a good choice. The students seem to like and understand > the book and they are able to do the exercises. I like the level of > detail in the book; it is enough to do real work but not overwhelming. > > I have been following the presentation in the book pretty closely, > partly because it is a lot less work for me, but also because the book > is well thought out and consistently builds on what has gone before. We > cover one chapter a week. > > I have taught five two-hour classes so far. We have covered through > chapter 5, Lists and Dictionaries. The last class was great! I had quite > a few notes from the chapter and was worried that I wouldn't get through > them, but the class got it quickly and we went into some more advanced > material. I did a lot of work with list comprehensions and even showed > them compound data structures (lists of tuples, dicts mapping string to > list) and decorate-sort-undecorate. > > The best part of the class for me was to see the students catch on to > how cool Python is. They were smiling and getting it. I honestly don't > know how much they will retain of the more advanced material but for > them to get a hint of how easy it is to work with data structures in > Python was great. > > The best student has written a real program already (a program that does > something he cares about). It reads a CSV file and makes a consolidated > index. It's pretty simple stuff but he figured out the file part and a > simple CSV parser on his own. I showed him the csv module and he thought > that would be very useful for other programs. > > At the end of the class last week, after I demonstrated some > particularly over-the-top bit of Python coolness, this student was > thunderstruck. I wasn't sure if I had finally lost him, or if he was > just blown away by how cool it was, so I asked him. He was blown away > :-)) We're talking slack-jawed, slumped-back-in-the-seat amazement, folks! > > I'm having a great time, too. I definitely want to do this again, maybe > I will try a course for experienced programmers next time. Awesome! Thanks for the status report. Anna From eternity739 at earthlink.net Fri Nov 5 09:28:01 2004 From: eternity739 at earthlink.net (John Naughton) Date: Fri Nov 5 09:28:41 2004 Subject: [Edu-sig] Needing information on Python: Message-ID: <002d01c4c311$5e64ef30$b6c8b83f@THRESHINGFLOOR> Yes I was wondering if there are any online sites that have free lessons on Python, as well as any downloadable software in which I could use to educate myself in Python, Thankyou, Mr. J.C.Naughton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20041105/d08d6a13/attachment.html From david at handysoftware.com Fri Nov 5 13:58:25 2004 From: david at handysoftware.com (David Handy) Date: Fri Nov 5 13:58:40 2004 Subject: [Edu-sig] Needing information on Python: In-Reply-To: <002d01c4c311$5e64ef30$b6c8b83f@THRESHINGFLOOR> References: <002d01c4c311$5e64ef30$b6c8b83f@THRESHINGFLOOR> Message-ID: <20041105125825.GA11286@arno2> On Fri, Nov 05, 2004 at 03:28:01AM -0500, John Naughton wrote: > Yes I was wondering if there are any online sites that have free lessons > on Python, as well as any downloadable software in which I could use to > educate myself in Python, > > Thankyou, > Mr. J.C.Naughton You are in luck, there are plenty if sites for you. My favorite free on-line Python tutorial for beginning programmers is the one by Josh Cogliati at: http://www.honors.montana.edu/~jjc/easytut/easytut/ If this is too basic for you, the main Python website has a tutorial for experienced programmers. Your free tutorial software is Python itself. Go to the main Python website at www.python.org and hit the download link. Install the version for your type of computer (Windows, I presume.) Once you install Python, then from the Start menu select "Programs", then "Python 2.3", then "IDLE (Python GUI)". When IDLE starts you should see a window titled "Python Shell". Now follow the examples in Josh's tutorial, starting with: print "Hello, World!" You're on your way! If like me, you get completely sucked in, you'll want to get a book or two on Python, tell everyone you meet how great Python is, try to teach your children how to program in Python, etc. Have fun! David H. From jeff at elkner.net Fri Nov 5 15:05:34 2004 From: jeff at elkner.net (Jeffrey Elkner) Date: Fri Nov 5 15:05:03 2004 Subject: [Edu-sig] Needing information on Python: In-Reply-To: <20041105125825.GA11286@arno2> References: <002d01c4c311$5e64ef30$b6c8b83f@THRESHINGFLOOR> <20041105125825.GA11286@arno2> Message-ID: <1099663534.11318.96.camel@mdeicaza> I have been a big fan of the LiveWires Python course for several years now. My students really enjoy using it, and they are particularly excited by being able to make PacMan while in a 1st year programming course. I just posted a web version of the course materials: http://www.ibiblio.org/obp/pyBiblio/livewires/ The markup has been changed from LaTeX to lore. I've only begun testing this with my classes now, but I thought I ought let other folks have a look at it in case they are interested. Thanks! On Fri, Nov 05, 2004 at 03:28:01AM -0500, John Naughton wrote: > Yes I was wondering if there are any online sites that have free lessons > on Python, as well as any downloadable software in which I could use to > educate myself in Python, > > Thankyou, > Mr. J.C.Naughton -- Jeffrey Elkner Open Book Project From urnerk at qwest.net Fri Nov 5 17:23:10 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Nov 5 17:23:13 2004 Subject: [Edu-sig] Needing information on Python: In-Reply-To: <002d01c4c311$5e64ef30$b6c8b83f@THRESHINGFLOOR> Message-ID: <20041105162311.B27901E400B@bag.python.org> Hi John ? My colleagues have given you excellent suggestions. Another one you might want to check out is ?Dive Into Python? which was for the longest time a web based tutorial, but was recently picked up by Apress and turned into a book. http://diveintopython.org/toc/index.html Kirby ________________________________________ From: edu-sig-bounces@python.org [mailto:edu-sig-bounces@python.org] On Behalf Of John Naughton Sent: Friday, November 05, 2004 12:28 AM To: Edu-sig@python.org Subject: [Edu-sig] Needing information on Python: Importance: High Yes I was wondering if there are any online sites that have free lessons on Python, as well as any downloadable software in which I could use to educate myself in Python, ? Thankyou, Mr. J.C.Naughton From samtani at ISI.EDU Fri Nov 5 17:22:04 2004 From: samtani at ISI.EDU (Prasan Samtani) Date: Fri Nov 5 17:25:17 2004 Subject: [Edu-sig] Re: Intro to Python course References: <20041105110004.9D5B61E4015@bag.python.org> Message-ID: <000401c4c353$9958c4d0$6500a8c0@mard> > Kent Johnson wrote: > > I am teaching "Introduction to Programming with Python" with a local > > adult ed program. Here is a status report:..... So you guys finally agree that teaching Python to C++ programmers or ex-programmers really is a wonderful experience. Great job! I recall the same slack jawed expression when I was giving a tutorial to sophomore college students... WARNING: This wont work with ex-LISPers ;) From urnerk at qwest.net Sat Nov 6 00:46:35 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sat Nov 6 00:46:37 2004 Subject: [Edu-sig] Mentoring experiences In-Reply-To: <000401c4c353$9958c4d0$6500a8c0@mard> Message-ID: <20041105234635.E0E7E1E4002@bag.python.org> So I met with my 3rd grader this afternoon. He was happy to have finally gotten Fedora running on a donated ThinkPad. He suggested I add IDLE to the Gnome taskbar, which I did -- he had no problem following. We hooked the ThinkPad to a classroom projector while booting a few Windows machines (2000 and 98) into IDLE. As other students dropped in, we did a quick impromptu intro to Python. Use it as a calculator, write a basic function. The word of the week at this school is: pneumonoultramicroscopicsilicovolcanokoniosis def added(word): return word + 'ed' def maketitle(phrase): return phrase.title() The first function added 'ed' to the end, which didn't make a lot of sense with this word as input, but oh well. Better to use verbs. We only had a few minutes today. I quickly showed how to save these as .py files for later. And the 8th grader and I have been corresponding by email a bit. He's learned enough Python to figure out some Roman Catholic holy days. Kirby From kent37 at tds.net Sun Nov 7 23:36:14 2004 From: kent37 at tds.net (Kent Johnson) Date: Sun Nov 7 23:36:19 2004 Subject: [Edu-sig] Teaching about files Message-ID: <418EA35E.8040906@tds.net> I'm getting ready to teach about files this week. I'm not too happy with this chapter in Dawson. He spends quite a lot of time on f.read(n) and f.readline(n) and very little on 'for line in f:'. In several months of answering questions on the Tutor list, I have seen many programs whose structure is (or could be) like this: f = open(...) for line in f: data = line.split() # or some variation of this # do something with data Sometimes the programs are written with readlines(), sometimes it is f.read() followed by split('\n'), but it's all the same idea and the best way to express it is with 'for line in f:'. On the other hand, I can't remember any use of f.read(n) on the Tutor list at all. And it's hard to imagine why I would use f.readline(n); why not just f.readline() and process the line data? (Maybe if lines could be gargantuan...) So my question is, am I missing something here? Is f.read(n) important? I want to de-emphasize f.read(n) and ignore f.readline(n), and emphasize 'for line in f:', with f.read(), f.readline() and f.readlines() also covered. Thanks, Kent From urnerk at qwest.net Mon Nov 8 00:16:16 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Nov 8 00:16:27 2004 Subject: [Edu-sig] A better way? In-Reply-To: <418EA35E.8040906@tds.net> Message-ID: <20041107231626.87CE51E4002@bag.python.org> Just for exercise, one of my students assigned himself the task of making instance attributes and methods accessible using square brackets instead of dot notation. This is the best solution I've been able to come up with so far. Suggestions? >>> class Test: def __init__(self): self.attr1 = 1 self.attr2 = 2 def method1(self): print "Cough" def method2(self): print "Chuckle" def __getitem__(self, value): return eval('self.'+value) >>> otest = Test() >>> otest['attr2'] 2 >>> otest['method1']() Cough Kirby From Scott.Daniels at Acm.Org Mon Nov 8 00:38:58 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Mon Nov 8 00:37:42 2004 Subject: [Edu-sig] Re: A better way? In-Reply-To: <20041107231626.87CE51E4002@bag.python.org> References: <418EA35E.8040906@tds.net> <20041107231626.87CE51E4002@bag.python.org> Message-ID: Kirby Urner wrote: > Just for exercise, one of my students assigned himself the task of making > instance attributes and methods accessible using square brackets instead of > dot notation. This is the best solution I've been able to come up with so > far. Suggestions? > > >>> class Test: > def __init__(self): > self.attr1 = 1 > self.attr2 = 2 > def method1(self): print "Cough" > def method2(self): print "Chuckle" > def __getitem__(self, value): > return eval('self.'+value) > > > >>> otest = Test() > >>> otest['attr2'] > 2 > >>> otest['method1']() > Cough > > Kirby What's wrong with: >>> class Test: def __init__(self): self.attr1 = 1 self.attr2 = 2 def method1(self): print "Cough" def method2(self): print "Chuckle" def __getitem__(self, value): return getattr(self, value) >>> Test()['attr1'] 1 >>> Test()['attr2'] 2 >>> Test()['method1']() Cough >>> Test()['method2']() Chuckle -- -- Scott David Daniels Scott.Daniels@Acm.Org From john.zelle at wartburg.edu Mon Nov 8 01:09:13 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Mon Nov 8 01:10:02 2004 Subject: [Edu-sig] Teaching about files In-Reply-To: <418EA35E.8040906@tds.net> References: <418EA35E.8040906@tds.net> Message-ID: <418EB929.7070409@wartburg.edu> Kent, I'm with you. In my book, I mention read, readline and readlines, but virtually all the programs just make use of the "for line in file" idiom. Of course in another chapter I use readline and a while loop, but that's just to show how to do an end-of-file loop for those unfortunate souls who will have to process files in a different language. The read(n) code is more useful for situations like reading from network sockets. Just my two cents. --John Kent Johnson wrote: > I'm getting ready to teach about files this week. > > I'm not too happy with this chapter in Dawson. He spends quite a lot > of time on f.read(n) and f.readline(n) and very little on 'for line in > f:'. > > In several months of answering questions on the Tutor list, I have > seen many programs whose structure is (or could be) like this: > f = open(...) > for line in f: > data = line.split() # or some variation of this > # do something with data > > Sometimes the programs are written with readlines(), sometimes it is > f.read() followed by split('\n'), but it's all the same idea and the > best way to express it is with 'for line in f:'. > > On the other hand, I can't remember any use of f.read(n) on the Tutor > list at all. And it's hard to imagine why I would use f.readline(n); > why not just f.readline() and process the line data? (Maybe if lines > could be gargantuan...) > > So my question is, am I missing something here? Is f.read(n) > important? I want to de-emphasize f.read(n) and ignore f.readline(n), > and emphasize 'for line in f:', with f.read(), f.readline() and > f.readlines() also covered. > > Thanks, > Kent > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > > From kent37 at tds.net Mon Nov 8 01:30:49 2004 From: kent37 at tds.net (Kent Johnson) Date: Mon Nov 8 01:30:55 2004 Subject: [Edu-sig] What do files and exceptions have in common? Message-ID: <418EBE39.6020809@tds.net> Still prepping for my files class. The chapter in Dawson is "Files and Exceptions". I think that is a little strange; what do files and exceptions have to do with each other, pedagogically? None of the file examples even use exceptions, and few of the exceptions examples use files. But whatever, I figure I'll stick with the program. But looking at other sources, I see Elkner's "Hot to Think Like a Computer Scientist" and Mark's "Dive into Python" have chapters called "Files and Exceptions" and "Exceptions and File Handling" respectively. Strange. Kent From urnerk at qwest.net Mon Nov 8 02:05:25 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Nov 8 02:05:26 2004 Subject: [Edu-sig] Re: A better way? In-Reply-To: Message-ID: <20041108010525.08C161E4010@bag.python.org> Scott: > What's wrong with: > > >>> class Test: > def __init__(self): > self.attr1 = 1 > self.attr2 = 2 > def method1(self): print "Cough" > def method2(self): print "Chuckle" > def __getitem__(self, value): > return getattr(self, value) > Yeah, that's better. Something similar came to me in the shower just now. >>> class Test(object): def __init__(self): self.attr1 = 1 self.attr2 = 2 def method1(self): print "Cough" def method2(self): print "Chuckle" def __getitem__(self, value): return self.__getattribute__(value) >>> otest = Test() >>> otest['attr1'] 1 >>> otest['attr2'] 2 >>> otest['method1']() Cough >>> otest['method2']() Chuckle But I like yours better. Thanks. Kirby From Scott.Daniels at Acm.Org Mon Nov 8 02:12:23 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Mon Nov 8 02:11:11 2004 Subject: [Edu-sig] Re: What do files and exceptions have in common? In-Reply-To: <418EBE39.6020809@tds.net> References: <418EBE39.6020809@tds.net> Message-ID: Kent Johnson wrote: > Still prepping for my files class. The chapter in Dawson is "Files and > Exceptions". I think that is a little strange; what do files and > exceptions have to do with each other, pedagogically? None of the file > examples even use exceptions, and few of the exceptions examples use files. I suspect the reason is that coping with files brings unavoidable errors in from the environment. Anyone who writes any file I/O code will find examples failing for OS- and current file system- specific behavior. You'll have to answer these questions at some point, so why not provide something they want to do (file I/O) at the same time as you talk about how to cope with various failures (which, on its own, sounds like a dry subject). -- -- Scott David Daniels Scott.Daniels@Acm.Org From kent37 at tds.net Mon Nov 8 02:37:45 2004 From: kent37 at tds.net (Kent Johnson) Date: Mon Nov 8 02:37:57 2004 Subject: [Edu-sig] Re: What do files and exceptions have in common? In-Reply-To: References: <418EBE39.6020809@tds.net> Message-ID: <418ECDE9.5000101@tds.net> Scott David Daniels wrote: > Kent Johnson wrote: > >> what do files and >> exceptions have to do with each other, pedagogically? > > I suspect the reason is that coping with files brings unavoidable > errors in from the environment. Good point. As soon as you start reading files, you open yourself up to the viccisitudes of real world data. In fact, a fairly common error on the Tutor list is an IndexError coming from programs like this: for line in open(...): data = line.split() # do something with data[0], data[1], data[2] when the input file contains a blank line. Sounds like a great way to introduce exceptions! Thanks, Kent From john.zelle at wartburg.edu Mon Nov 8 02:56:56 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Mon Nov 8 02:57:48 2004 Subject: [Edu-sig] What do files and exceptions have in common? In-Reply-To: <418EBE39.6020809@tds.net> References: <418EBE39.6020809@tds.net> Message-ID: <418ED268.5080705@wartburg.edu> Kent Johnson wrote: > Still prepping for my files class. The chapter in Dawson is "Files and > Exceptions". I think that is a little strange; what do files and > exceptions have to do with each other, pedagogically? None of the file > examples even use exceptions, and few of the exceptions examples use > files. > > But whatever, I figure I'll stick with the program. But looking at > other sources, I see Elkner's "Hot to Think Like a Computer Scientist" > and Mark's "Dive into Python" have chapters called "Files and > Exceptions" and "Exceptions and File Handling" respectively. > > Strange. > This is interesting. Could this be related to the fact that File processing in Java _forces_ one to understand exceptions (since they either have to be handled or thrown)? If the authors are modeling their approach on a Java book, this would be very natural. Of course, the fact that Java forces this suggests that exception handling is an important facet of file IO at some level. We all have our favorite order for doing things. In my book, I introduce files in an early chapter on string processing. Text files are really just multi-line strings. The ideas are reinforced later in a chapter on looping structures, since reading until end-of-file is a particularly common kind of loop. I like to talk about exceptions as a special kind of decision structure (in languages w/o exceptions, you would check returned error codes with ifs). So I put exceptions into a chapter on decisions (ifs). To each his own. --John From Scott.Daniels at Acm.Org Mon Nov 8 03:03:41 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Mon Nov 8 03:02:26 2004 Subject: [Edu-sig] Re: What do files and exceptions have in common? In-Reply-To: <418ECDE9.5000101@tds.net> References: <418EBE39.6020809@tds.net> <418ECDE9.5000101@tds.net> Message-ID: I have been starting to look over Alan Gauld's python tutorial: http://www.freenetpages.co.uk/hp/alan.gauld/ and sent him a comment to the following effect which seems germane here. When explaining exceptions, it is useful to point out that exceptions are problems that are caught, not at the source of the mistake, but at the point where the computer program notices something is amiss. Usually something the user does wrong looks, initially, like a valid response that leads to trouble later, but the error reporting starts when the "leads to trouble later" actually happens. This lag is what makes computer error messages seem so inane. -- -- Scott David Daniels Scott.Daniels@Acm.Org From lac at strakt.com Mon Nov 8 06:00:24 2004 From: lac at strakt.com (Laura Creighton) Date: Mon Nov 8 06:00:30 2004 Subject: [Edu-sig] A better way? In-Reply-To: Message from "Kirby Urner" of "Sun, 07 Nov 2004 15:16:16 PST." <20041107231626.87CE51E4002@bag.python.org> References: <20041107231626.87CE51E4002@bag.python.org> Message-ID: <200411080500.iA850ONM018935@ratthing-b246.strakt.com> In a message of Sun, 07 Nov 2004 15:16:16 PST, "Kirby Urner" writes: > >Just for exercise, one of my students assigned himself the task of making >instance attributes and methods accessible using square brackets instead >of >dot notation. This is the best solution I've been able to come up with s >o >far. Suggestions? > > >>> class Test: > def __init__(self): > self.attr1 = 1 > self.attr2 = 2 > def method1(self): print "Cough" > def method2(self): print "Chuckle" > def __getitem__(self, value): > return eval('self.'+value) > > > >>> otest = Test() > >>> otest['attr2'] > 2 > >>> otest['method1']() > Cough > >Kirby > Is this what you want? Python 2.3.4c1 (#2, May 13 2004, 21:46:36) [GCC 3.3.3 (Debian 20040429)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class Test: ... def __init__(self): ... self.attr1 = 1 ... self.attr2 = 2 ... def method1(self): print "Cough" ... def method2(self): print "Chuckle" ... def __getitem__(self, method_name): ... method = getattr(self, method_name, None) ... if callable(method): ... method() ... else: ... return method ... >>> otest = Test() >>> otest['attr2'] 2 >>> otest['method1'] Cough >>> -------- Note method(*args, **kwargs), not shown here will work when your method wants arguments. Good luck, I am off to catch an airplane, back on Nov 28 or so, and probably not answering mail ... Laura From dyoo at hkn.eecs.berkeley.edu Mon Nov 8 07:09:14 2004 From: dyoo at hkn.eecs.berkeley.edu (Danny Yoo) Date: Mon Nov 8 07:09:20 2004 Subject: [Edu-sig] Teaching about files In-Reply-To: <418EA35E.8040906@tds.net> Message-ID: On Sun, 7 Nov 2004, Kent Johnson wrote: > So my question is, am I missing something here? Is f.read(n) important? Hi Kent, The most common use for f.read(n) in my personal experience has been in conjunction with the 'md5' module on really large files. I have sometimes done read(1), for character-by-character stuff. But otherwise, I tend to use files as iterators. I try to deemphasize read() and readlines(), as sucking a whole file as a list isn't a technique that will scale well with large inputs. Good luck! From ajsiegel at optonline.net Mon Nov 8 14:45:17 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Nov 8 14:46:59 2004 Subject: [Edu-sig] What do files and exceptions have in common? In-Reply-To: <418ED268.5080705@wartburg.edu> References: <418EBE39.6020809@tds.net> <418ED268.5080705@wartburg.edu> Message-ID: <1099921517.24192.23.camel@localhost.localdomain> On Sun, 2004-11-07 at 19:56 -0600, John Zelle wrote: > I like to talk about exceptions as a special kind of decision structure > (in languages w/o exceptions, you would check returned error codes with > ifs). So I put exceptions into a chapter on decisions (ifs). > That makes sense to me. In that what one wants to communicate about exceptions is that they are not necessarily exceptional or unexpected. And can be used, as you say, as part of a decision structure. I recently needed to convert a large ascii report from a legacy system and turn it into data. I was not working in Python. What ended up making sense is trying to convert a certain range of positions of each line to a date, relying on the fact that I would get errors on the conversion attempt for the lines that did not contain the data I was trying to process But it tends to be a somewhat advanced topic. I found in my most recent refactoring of PyGeo that a number of bugs had been hidden and/or created by sloppy use of exceptions. In other words, it took me a while to catch on. One of the reasons VB had seemed so primitive to me - coming from Python - was its very limited facility with exceptions. I think VB.Net deals with this to a decent extent. Art From Scott.Daniels at Acm.Org Mon Nov 8 16:20:16 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Mon Nov 8 16:19:01 2004 Subject: [Edu-sig] Learning to Program comments Message-ID: "Looping - Or the art of repeating oneself / More about the Python _for_ construct " Guido has said that single-line ifs and loops are one of his regrets. The temptation to use the is great, and the problem is, that in isolation they look clear. White space is not that expensive (esp on a computer screen). Since my code does seem to want to cramp up myself, I force myself to pretend that a colon ends the line (except for comments). I'd suggest you might break even your single-line loops into two lines. First, it makes it easier distinguish the sequence from the repeated statement: >>> for word in ('one','word', 'after', 'another'): ... print word ... vs. >>> for word in ('one','word', 'after', 'another'): print word ... These are not to tough to piece out, but seeing the trailing comma in the following example and distinguishing it from the construct visually is much easier when you are looking at ... print word vs. ... print word, As I hope I've said before, I am not dead certain I'm right, but I'm hoping you'd like to have the comments to apply or ignore as you see fit. -- Scott David Daniels Scott.Daniels@Acm.Org From Scott.Daniels at Acm.Org Mon Nov 8 16:21:35 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Mon Nov 8 16:30:10 2004 Subject: [Edu-sig] Re: Learning to Program comments In-Reply-To: References: Message-ID: Sorry about the above, I thought I was using e-mail, not posting. -- Scott David Daniels Scott.Daniels@Acm.Org From marilyn at deliberate.com Mon Nov 8 19:43:03 2004 From: marilyn at deliberate.com (Marilyn Davis) Date: Mon Nov 8 19:43:06 2004 Subject: [Edu-sig] Teaching about files In-Reply-To: Message-ID: On Sun, 7 Nov 2004, Danny Yoo wrote: > > > On Sun, 7 Nov 2004, Kent Johnson wrote: > > > So my question is, am I missing something here? Is f.read(n) important? > > Hi Kent, > > The most common use for f.read(n) in my personal experience has been in > conjunction with the 'md5' module on really large files. I have sometimes > done read(1), for character-by-character stuff. But otherwise, I tend to > use files as iterators. I'm collecting some regression tests for our new mail system, which is turning out to be a big hogpodge of interacting scripts, so, for each test, I gather the output of my MTA log, as well as the input, as well as other files that my various scripts write, and I gather any new mail messages generated -- all into one file. For this, or any time you want to copy one file to another, this is really nice to type: fp_out.write(fp_in.read()) > I try to deemphasize read() and readlines(), as sucking a whole file as a > list isn't a technique that will scale well with large inputs. Yes! You don't want to do anything that causes iterations through the data unless you need to -- if you need performance. And even fp_in.read() isn't good if you don't want to hold the whole file in memory. I'm careful not to do that in production code. I can't think of a reason to use readlines(), unless you wanted to do some processing on the first line that depends on the contents of the last line, or maybe you want to count the number of lines and output that before you output the file contents?? I will be teaching file IO Wednesday night. So I'm grateful for this discussion. Thank you and good luck. Marilyn Davis > > Good luck! > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > -- From phf at cs.ucr.edu Tue Nov 9 00:57:22 2004 From: phf at cs.ucr.edu (Peter Froehlich) Date: Tue Nov 9 08:05:53 2004 Subject: [Edu-sig] Teaching about files In-Reply-To: References: Message-ID: Hi all, On Nov 7, 2004, at 22:09, Danny Yoo wrote: > On Sun, 7 Nov 2004, Kent Johnson wrote: > >> So my question is, am I missing something here? Is f.read(n) >> important? > [...] > I try to deemphasize read() and readlines(), as sucking a whole file > as a > list isn't a technique that will scale well with large inputs. I teach compilers and allow students to write their compilers in Python. The data structures they build tend to be *much* larger than the actual source file. So however long that source file is, you can "suck it in" since you will *surely* fail with any processing if you run out of memory for the file already. What I am trying to say is that input alone is not really the bottleneck, it's what you do with it. Also, I prefer read() in this setting as the compiler doesn't care about line numbers. It identifies errors as "offsets" in the file, so reading line-by-line really does not buy anything. However, in the end, I agree that the iteration syntax is nice if your problem is of the right kind. Peter -- Peter H. Froehlich <><><><><><> http://www.cs.ucr.edu/~phf/ OpenPGP: ABC2 9BCC 1445 86E9 4D59 F532 A8B2 BFAE 342B E9D9 From tjd at sfu.ca Wed Nov 10 00:17:59 2004 From: tjd at sfu.ca (Toby Donaldson) Date: Wed Nov 10 00:18:14 2004 Subject: [Edu-sig] Re: Teaching about files In-Reply-To: <20041109110004.5A5C11E4009@bag.python.org> Message-ID: <002e01c4c6b2$60a4d4f0$393957d1@surrey.sfu.ca> >> So my question is, am I missing something here? Is f.read(n) >> important? If you know you are only reading small files, then f.read() is great --- it changes a file processing problem into a string processing problem. The "for line in file:" idiom runs into problems if the file doesn't happen to have '\n's in it. To be sure, you always need to limit the number of bytes you read in. Toby -- Dr. Toby Donaldson School of Computing Science (Surrey) Simon Fraser University From cben at users.sf.net Thu Nov 11 20:10:18 2004 From: cben at users.sf.net (Beni Cherniavsky) Date: Thu Nov 11 20:10:37 2004 Subject: [Edu-sig] Teaching about files In-Reply-To: References: Message-ID: <4193B91A.9090006@users.sf.net> Danny Yoo wrote: > > On Sun, 7 Nov 2004, Kent Johnson wrote: > >>So my question is, am I missing something here? Is f.read(n) important? > > Hi Kent, > > The most common use for f.read(n) in my personal experience has been in > conjunction with the 'md5' module on really large files. I have sometimes > done read(1), for character-by-character stuff. But otherwise, I tend to > use files as iterators. > I once did some profiling on character-by-character stuff and discovered that simply iterating over ``f.read()`` is much faster than repeated ``f.read(1)``, somewhat faster than reading chunks with ``f.read(n)`` and iterating over each one (nested loop) and not slower than ``mmap.mmap(f)``. I was using it for files of several MBs and I had enough RAM to contain it. Memory-mapping is probably the best approach for heavy processing but must be conditionalized -- it isn't always availiable. So I went with ``f.read()`` for simplicity. > I try to deemphasize read() and readlines(), as sucking a whole file as a > list isn't a technique that will scale well with large inputs. > ``f.read()`` is very useful for simple tasks. First show the simplest way to do something, optimize only when needed. `readlines()` is indeed not very useful because almost in all case where it is applicable, ``for line in f`` is sufficient. BTW, the `inputfile` module should definitely be mentioned -- it's very handy for writing useful scripts. -- And data is not difficult. It's only data. If you have too much, filter it. If it's not what you want, map it. -- Dive Into Python, chapter 16.5 "Data-centric programming" From urnerk at qwest.net Thu Nov 11 20:29:19 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Nov 11 20:29:20 2004 Subject: [Edu-sig] Teaching about files In-Reply-To: <4193B91A.9090006@users.sf.net> Message-ID: <20041111192919.551241E4003@bag.python.org> My most recent use of read() was to cPickle a file for stuffing into a mySQL blob. That's an example of when you don't care about any line-by-line stuff. I also didn't worry about memory issues -- more of a cookbook example than production code (in fact, I got most of the code from the Python Cookbook). -- Kirby From ajsiegel at optonline.net Fri Nov 12 22:12:14 2004 From: ajsiegel at optonline.net (Arthur) Date: Fri Nov 12 22:12:49 2004 Subject: [Edu-sig] Another good thing Message-ID: <0I7300GC048DCQ@mta7.srv.hcvlny.cv.net> Like to report good things, to offset my crankiness. ...finding myself again lucky have hooked onto Python. My recent lament on whither PyGeo mentioned a particular frustration with not having the facility to do the kind of cross-platform distribution I would like, with my current skill set. The particulars of that lament concerned facing the learning curve of doing a compliant Debian distribution. That seemed to me to be a requirement, as Debian and its off-shoots are doing the kinds of the distros that best represent the kind of homes I would hope to find for PyGeo. And with my ubuntu cranking, I've become more hands on with a Debian based distro, and more a fan of apt-get (from the Synapatic interface, particularly). And low and behold, a check into dist-utils and it appears the contributors have just picked up the gauntlet and are well on their way to a bdist_deb facility for distutils. Very swell. Art From villate at gnu.org Sat Nov 13 18:10:12 2004 From: villate at gnu.org (Jaime E. Villate) Date: Sat Nov 13 18:11:47 2004 Subject: [Edu-sig] Teaching about files In-Reply-To: <418EA35E.8040906@tds.net> References: <418EA35E.8040906@tds.net> Message-ID: <20041113171011.GA3347@fe.up.pt> On Sun, Nov 07, 2004 at 05:36:14PM -0500, Kent Johnson wrote: > > So my question is, am I missing something here? Is f.read(n) important? > I want to de-emphasize f.read(n) and ignore f.readline(n), and emphasize > 'for line in f:', with f.read(), f.readline() and f.readlines() also > covered. The "Python Cookbook" (Edited by A. Matelli & David Ascher, O'Reilly, 2002) has a very nice section on that topic. 'for line in f:' is really the best method. The fact that it was only introduced in Python 2.2 might explain why you still find examples where it is not used or not given enough emphasis. readlines can fail or become very slow with big files, because it reads the whole file and returns a list of lines. Python 2.1 introduced xreadlines that does the same job using a limited amount of memory. Since Python 2.2, those methods can be replaced by 'for line in f:'. read is very useful when you need to access some specific bytes in a file rather than a line, or if you're reading a binary file where the concept of line does not exist. Regards, Jaime From urnerk at qwest.net Sat Nov 13 20:38:58 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sat Nov 13 20:39:00 2004 Subject: [Edu-sig] Teaching Python with the Calendar In-Reply-To: <20041113171011.GA3347@fe.up.pt> Message-ID: <20041113193859.807941E4002@bag.python.org> Since starting with Python tutoring, I've already learned a lot. For example, I'm a new convert to this technique of programming around the Gregorian calendar (that's the familiar one, to us ISO-Latin types). It's a good mix of real world and abstraction, in that figuring the holidays is kinda messy (given the calendar is -- leap year and all that), yet coded solutions exist (most easily within the epoch -- I've not ventured outside it). For example, Columbus Day is the Monday nearest to October 12th. Here's my code for that: def getcolday(y): """ Get Columbus Day, return daynum Monday closest to Oct 12 """ i = j = 12 while calendar.weekday(y, 10, i) <> 0: i -= 1 while calendar.weekday(y, 10, j) <> 0: j += 1 if abs(12-i) > abs(12-j): closest = j else: closest = i return getdaynum(y, 10, closest) def getdaynum(y, m, d): """ Return day number """ return time.localtime(time.mktime((y, m, d, 0, 0, 0, 0, 0, 0)))[7] What gets returned is an integer between 1 and 365 (or 366 on leap years), which I then use against a dictionary that looks like this (my student compiled it -- I credit him in the comments, but redact for here): def alldates(year): """ Returns all the dates of holidays in a year in a dictionary Compiled by xxx """ leap = calendar.isleap(year) easter = geteaster(year) easter = apply(getdaynum, easter) thedays = {304 + leap : 'Halloween', 185 + leap : 'July 4th', 359 + leap : 'Christmas', 305 + leap : 'All Saints Day', 306 + leap : 'All Souls Day', 1 : 'New Year\'s Day', 365 + leap : 'New Year\'s Eve', 315 + leap : 'Veterans Day', 165 + leap : 'Flag Day', easter : 'Easter', easter - 1 : 'Holy Saturday', easter - 2 : 'Good Friday', easter - 7 : 'Palm Sunday', easter - 40 : 'Ash Wednesday', getnthday(year,11,3,4) : 'Thanks- giving', getnthday(year,1,0,3) : "MLK B'day", getnthday(year,2,0,3) : "Presidents Day", getmemday(year) : "Memorial Day", getnthday(year,9,0,1) : "Labor Day", getcolday(year) : "Columbus Day" } return thedays Beyond just coding the holidays (I focused on some Xtian plus a few secular, in part because my student is interested in the Roman Catholic calendar -- alternative dictionaries suggest themselves) there's the CGI angle. Of course this is not a new idea, I found many websites implementing it, but to roll one of one's own, in Python, provides a useful exercise: in cgi, HTML, even CSS. Here's my latest example: http://www.4dsolutions.net/cgi-bin/calendar2.cgi Kirby From glingl at aon.at Sun Nov 14 11:50:53 2004 From: glingl at aon.at (Gregor Lingl) Date: Sun Nov 14 11:50:33 2004 Subject: [Edu-sig] Teaching Python with the Calendar In-Reply-To: <20041113193859.807941E4002@bag.python.org> References: <20041113193859.807941E4002@bag.python.org> Message-ID: <4197388D.7020703@aon.at> Very interesting, Kirby! Would you mind to publish the source of the cgi-script, e.g. provide it as an attachment? As a first step I'd like to try to produce an Austrian version of your calendar (different holidays, of course). Regards, Gregor Kirby Urner schrieb: >Since starting with Python tutoring, I've already learned a lot. For >example, I'm a new convert to this technique of programming around the >Gregorian calendar (that's the familiar one, to us ISO-Latin types). > >It's a good mix of real world and abstraction, in that figuring the holidays >is kinda messy (given the calendar is -- leap year and all that), yet coded >solutions exist (most easily within the epoch -- I've not ventured outside >it). > >For example, Columbus Day is the Monday nearest to October 12th. Here's my >code for that: > >def getcolday(y): > """ > Get Columbus Day, return daynum > Monday closest to Oct 12 > """ > i = j = 12 > while calendar.weekday(y, 10, i) <> 0: > i -= 1 > while calendar.weekday(y, 10, j) <> 0: > j += 1 > if abs(12-i) > abs(12-j): > closest = j > else: > closest = i > return getdaynum(y, 10, closest) > >def getdaynum(y, m, d): > """ > Return day number > """ > return time.localtime(time.mktime((y, m, d, 0, 0, 0, 0, 0, 0)))[7] > >What gets returned is an integer between 1 and 365 (or 366 on leap years), >which I then use against a dictionary that looks like this (my student >compiled it -- I credit him in the comments, but redact for here): > >def alldates(year): > """ > Returns all the dates of holidays in a year in a dictionary > Compiled by xxx > """ > leap = calendar.isleap(year) > easter = geteaster(year) > easter = apply(getdaynum, easter) > thedays = {304 + leap : 'Halloween', > 185 + leap : 'July 4th', > 359 + leap : 'Christmas', > 305 + leap : 'All Saints Day', > 306 + leap : 'All Souls Day', > 1 : 'New Year\'s Day', > 365 + leap : 'New Year\'s Eve', > 315 + leap : 'Veterans Day', > 165 + leap : 'Flag Day', > easter : 'Easter', > easter - 1 : 'Holy Saturday', > easter - 2 : 'Good Friday', > easter - 7 : 'Palm Sunday', > easter - 40 : 'Ash Wednesday', > getnthday(year,11,3,4) : 'Thanks- giving', > getnthday(year,1,0,3) : "MLK B'day", > getnthday(year,2,0,3) : "Presidents Day", > getmemday(year) : "Memorial Day", > getnthday(year,9,0,1) : "Labor Day", > getcolday(year) : "Columbus Day" > } > return thedays > >Beyond just coding the holidays (I focused on some Xtian plus a few secular, >in part because my student is interested in the Roman Catholic calendar -- >alternative dictionaries suggest themselves) there's the CGI angle. > >Of course this is not a new idea, I found many websites implementing it, but >to roll one of one's own, in Python, provides a useful exercise: in cgi, >HTML, even CSS. > >Here's my latest example: http://www.4dsolutions.net/cgi-bin/calendar2.cgi > >Kirby > > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig > > > > From urnerk at qwest.net Sun Nov 14 19:50:46 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Nov 14 19:50:48 2004 Subject: [Edu-sig] Teaching Python with the Calendar In-Reply-To: <4197388D.7020703@aon.at> Message-ID: <20041114185047.346A51E4002@bag.python.org> > Very interesting, Kirby! > Would you mind to publish the source of the cgi-script, > e.g. provide it as an attachment? > As a first step I'd like to try to produce an Austrian version > of your calendar (different holidays, of course). > Regards, > Gregor Yes. For now I will send you the code as a separate attachment. I pointed my student to edu-sig earlier for some discussion of his 'accessing a class with square brackets' question, and my cgi script may contain some things he'd prefer to work out himself just now (I did share the code for a more primitive http://www.4dsolutions.net/cgi-bin/calendar.cgi to help him get going). He's preoccupied with hardware issues around a new linux distro at the moment, and so is running a bit behind in the cgi department. It's actually two programs: calendar2.cgi gets the month and year (this month if none passed in the url), and draws the calendar (using HTML + CSS). The other program, holidays.py, has the responsibility to return a dictionary, per given year, containing holidays with 'day numbers' (1-365|6) as keys. A design issue I didn't solve, but could without much effort, is how to handle it when two holidays fall on the same calendar date. According to my student, there's only one such possibility in his mix of religious + USA-secular. If you're able to provide an Austria-based module similar to holidays.py, that has the same API (at least as an option), then I could swap it in, and still use calendar2.cgi unchanged. In the meantime, you'd of course be free to enhance your own version of calendar2.cgi in any direction. If anyone else wants to develop an alternative holidays module, or is curious about the code, just let me know and I'll attach the source. Kirby From ajsiegel at optonline.net Sat Nov 20 17:13:59 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Nov 20 17:15:40 2004 Subject: [Edu-sig] SHIKSHANTAR Message-ID: <1100967239.6582.38.camel@localhost.localdomain> Interesting site: SHIKSHANTAR The Peoples Institute for Rethinking Education and Development http://www.swaraj.org/shikshantar/ I was too present in the 60's to be be very sympathetic now to "The Peoples Institute ..." naming convention, but I will give to it no more importance than that of a naming convention ... and read on. What drew me here was following the link to "The Geek Shall Inherit the Earth" article by Mako Hill, linked from http://www.swaraj.org/shikshantar/stories_resistance.html My thread starts with the fact that Mako Hill is a Debian developer working for Mark Shuttleworth's company, and who happens to be speaking this week in New York at NYLUG regarding, among other things, the ubuntu distribution. What resonates with me from the SHIKSHANTAR is the concept of resistance to schooling. Let's assume that means to the extent the schooling is bad, and acknowledging that most schooling is bad (and I would contend signs point to it getting worse). And within that, what particularly appeals to me, is legitimizing self-education, as education, and the effort to organize and gather resources around that concept. My PyCon presentation was "PyGeo - An Adventure in Self-education with Python. But seeing the possibilities of self-education as an organizing principle for a form of radicalized resistance is not something I conceptualized before visiting SHIKSHANTAR. If what Kirby calls something to the effect of my dark visions of the future - an increasingly mechanized, profit-driven schooling - are at all prescient ,that it seems time to start identifying more with resistors, than with reformers. I seem to be in that transition. Art From urnerk at qwest.net Sat Nov 20 18:40:13 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sat Nov 20 18:40:08 2004 Subject: [Edu-sig] SHIKSHANTAR In-Reply-To: <1100967239.6582.38.camel@localhost.localdomain> Message-ID: <20041120174007.5E44A1E4002@bag.python.org> > If what Kirby calls something to the effect of my dark visions of the > future - an increasingly mechanized, profit-driven schooling - are at > all prescient ,that it seems time to start identifying more with > resistors, than with reformers. I seem to be in that transition. > > Art I'm all for resistance to status quo schooling, if said schooling keeps not sharing the good stuff, e.g. linux python internet, whereas time free to self educate (a precious commodity, we find out, when our jobs don't leave time for it) might move one deeply into these waters, especially with a good mentor or two. I regard myself as a subversive in my role as mentor for Saturday Academy, as I make the open source world very inviting and comprehensible to newcomers. They see me as a thriving adult, but not a teacher, and yet I'm willing to teach, and they see the connections to the real world, and, and... anyway, it's way cool. With regard to profits, though, I'm not sure why there's a disconnect. I'm *wanting* smart companies to market to these eager youth, to *help* them circumvent a stultifying schooling, if that's what's in the way. I don't think our difference is over the concept of profit per se, but over the cheap, underhanded way that some companies "earn" (not) their profits. On this, there will be some differences of opinion, but for the most part, I bet we'll agree at least half the time (re which companies are doing quality work). In the case of a monster-sized corporation like Disney, it's counter-productive to hand in a blanket judgment over some of the schlocky chachkas you'll find at Wal*Mart or wherever. With really big companies, the trick is to drill down looking for smaller units that contain seeds of the future you want to invest in. For me, Alan Kay and Squeak were sufficiently interesting and future-oriented to keep me thinking well of Disney -- despite a lot of other stuff that goes on. I have similar feelings about Pixar (which of course is huge, compared to Squeak). EPCOT was a very good idea, but the Epcot of today lies fallow, because the "imagineers" have largely checked out, or don't get budgets, or haven't read enough Bucky -- not sure where the problem is, but something's very broken. Anyway, I'm wanting tomorrow's kids to be advantaged in all kinds of ways, and that may well mean subverting a dominant paradigm or two, or three. We'll move heaven and earth to help these kids (including minority kids of all stripes, any kid wasting away in schlock-ville, in mass-consumer know-nothing-ville). I had two books for a kid I just had meeting with (his dad was there too, at a local coffee joint): 'The Church and the Bazaar' by Eric S. Raymond, and 'In the Beginning Was the Command Line' by Neal Stephenson. Both are available on-line, but sometimes hard copy saves on future eye-wear costs. Now, how many high schools do you know that list either of these titles on any syllabus. Precisely my point, and I think yours as well. Am I wrong? Kirby PS: haven't visited the web site you mentioned yet, but I intend to, and thanks in advance for the link. From kent37 at tds.net Sat Nov 20 21:52:36 2004 From: kent37 at tds.net (Kent Johnson) Date: Sat Nov 20 21:52:38 2004 Subject: [Edu-sig] Teaching Python to Programmers Message-ID: <419FAE94.4090903@tds.net> I am almost done with my Python for beginners course - more about that when it is over. Next term I'm going to try teaching Python to programmers, just for variety. So, a few questions... What should I use for a textbook? Learning Python is an obvious choice. I didn't really like Dive into Python so I don't think I will use that. Does anyone recommend Practical Python? I haven't read it and I'm wondering if I should get a copy. Here is a blurb for the course catalog. I would be happy for suggested improvements from better writers than I :-) --------------------- Python for Programmers Are you an experienced programmer looking to expand your abilities? Python is an excellent addition to your programming toolkit. Python is an interpreted, interactive, object-oriented programming language which combines remarkable power with exceptional ease-of-use. It is freely available, easy to learn and fun to use! Python's "batteries included" philosophy makes it suitable for a wide variety of applications including utilities, web programming, graphics and games. This class is for students with some previous programming experience who want to learn Python. -------------------- Thanks, Kent From urnerk at qwest.net Sun Nov 21 00:07:56 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Nov 21 00:07:51 2004 Subject: [Edu-sig] Teaching Python to Programmers In-Reply-To: <419FAE94.4090903@tds.net> Message-ID: <20041120230750.669611E4002@bag.python.org> > What should I use for a textbook? Learning Python is an obvious choice. > I didn't really like Dive into Python so I don't think I will use that. > Does anyone recommend Practical Python? I haven't read it and I'm > wondering if I should get a copy. > I recommend John Zelle's book, Python Programming, an Introduction to Computer Science -- at least as a source of ideas for the teacher, if not a required purchase for students. http://mcsp.wartburg.edu/zelle/python/ I like his graphics.py as a wrapper for Tkinter. On the other hand, if your students are really experienced, then I don't think the text book you're looking for really exists yet, and may never, given the breadth of possible interests. I'd do a handout with a list of titles, including that one about using Java class libraries from within Python (a Jython book). You should probably also get into IronPython (for .NET) and event-driven programming with wxPython (another library for GUIs). The Python Cookbook is also good. I think 'Learning Python' is too basic for experienced programmers. The computer courses I took at Princeton didn't come with a text book. The teacher assembled materials from a variety of sources. To me, this is usually one of the hallmarks of an advanced course. Textbooks are for sissies :-D. Kirby From marilyn at deliberate.com Sun Nov 21 00:23:12 2004 From: marilyn at deliberate.com (Marilyn Davis) Date: Sun Nov 21 00:23:16 2004 Subject: [Edu-sig] Teaching Python to Programmers In-Reply-To: <419FAE94.4090903@tds.net> Message-ID: On Sat, 20 Nov 2004, Kent Johnson wrote: > I am almost done with my Python for beginners course - more about that > when it is over. Next term I'm going to try teaching Python to > programmers, just for variety. So, a few questions... > > What should I use for a textbook? Learning Python is an obvious choice. > I didn't really like Dive into Python so I don't think I will use that. > Does anyone recommend Practical Python? I haven't read it and I'm > wondering if I should get a copy. > > Here is a blurb for the course catalog. I would be happy for suggested > improvements from better writers than I :-) You want to mention that it is good on all platforms. It's a flexible language, perfect for object-oriented programming, scripting, and rapid prototyping. You can throw in some buzzwords, saying it's a good language for web development, GUI, imaging, database, security, networking, ... just copy some of the module names. I'm teaching Python to programmers for the second time. I started out using "Python -- How to Program" by Deitel, but it was before the new "Learning Python" came out. I do like the order of things better in the Deitel book, and that it covers some applications: CGI, GUI, ... in depth. But it is really a basic programming book, teaching software engineering concepts too. I ended up teaching from both books and recommending, but not requiring, both. I often suggest reading from the online sources, not only because they are good, but also to get the students familiar with the treasury of online help. Good luck! Marilyn Davis > > --------------------- > Python for Programmers > > Are you an experienced programmer looking to expand your abilities? > Python is an excellent addition to your programming toolkit. Python is > an interpreted, interactive, object-oriented programming language which > combines remarkable power with exceptional ease-of-use. It is freely > available, easy to learn and fun to use! Python's "batteries included" > philosophy makes it suitable for a wide variety of applications > including utilities, web programming, graphics and games. > > This class is for students with some previous programming experience who > want to learn Python. > -------------------- > > Thanks, > Kent > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > -- From ajsiegel at optonline.net Sun Nov 21 03:01:35 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Nov 21 03:01:43 2004 Subject: [Edu-sig] SHIKSHANTAR In-Reply-To: <0I7H005IYNR80B@mta22.srv.hcvlny.cv.net> Message-ID: <0I7I00C7MAYT4F@mta8.srv.hcvlny.cv.net> Kirby writes - > With regard to profits, though, I'm not sure why there's a disconnect. > I'm > *wanting* smart companies to market to these eager youth, to *help* them > circumvent a stultifying schooling, if that's what's in the way. I don't > think our difference is over the concept of profit per se, but over the > cheap, underhanded way that some companies "earn" (not) their profits. On > this, there will be some differences of opinion, but for the most part, I > bet we'll agree at least half the time (re which companies are doing > quality > work). I'm not sure where our difference lies. Do you see some gizmo-doohickey coming around the corner sufficient to teach the average US student the lesson he/she probably most needs to learn, in order to become ready to learn - to remove their focus from the next gizmo-doohickey coming around the corner. Whether the student is over privileged, or under, the lesson plan should probably be the same - and a theme running through it should be about doing more with less. Aren't I being Fullerist? Where is the money to be made in promoting this lesson plan? Do we expect a profit-driven enterprise to be conceptualizing along these lines? I have no beef with Corporate America, as a more general matter. (I was glad to see Disney enter the video game market - glad for kids) But expecting something from Disney or the rest of Corporate America that it is not configured to provide, is unfair to everyone. Economic depression derives from excess capacity. Emotional depression, IMO, does as well. And an educational depression does as well. The configuration options selected are the wrong ones - being much more the issue than whether the hardware/software (literally and figuratively) is already readily available. It is, as much as it will ever be. Art From urnerk at qwest.net Sun Nov 21 05:35:08 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Nov 21 05:35:01 2004 Subject: [Edu-sig] The Geek Channel In-Reply-To: <0I7I00C7MAYT4F@mta8.srv.hcvlny.cv.net> Message-ID: <20041121043500.EC1B01E4002@bag.python.org> > Whether the student is over privileged, or under, the lesson plan should > probably be the same - and a theme running through it should be about > doing more with less. > I don't think there's one specific lesson plan or blueprint. > Where is the money to be made in promoting this lesson plan? Do we expect > a profit-driven enterprise to be conceptualizing along these lines? > Imagine a new Geek Channel on cable or via satellite, where kids can tune in to see vid clips of their heroes in the open source community, talking kernel design, futurism, hardware. Slashdot for television. OSCON 24/7 (repetitive, like Sesame Street -- segments for different ages, different shows). Twist in elements from scifi. Get some authors on, like Vonnegut. Radical OK. Clowning around OK. Both Python *and* Monty Python. Plenty to bliss out on, and for both boyz & girlz. Synchronized websites. Blogs. Damian's lecture on thermodynamics, the game of life, and programming using a Klingon version of perl -- there's an audience for this kind of thing. http://www.oreillynet.com/pub/wlg/5304 Should we call it the O'Reilly Network? I'd watch, if it were done at all well. I'd even help produce it. I'd watch Jim Hugunin talking about IronPython, or Tim Peters talking about anything, over political punditry, any day of the week. And I bet I'm typical of a big enough demographic to make this channel more than a little attractive to advertisers. Kirby PS: and remember, you heard it here first. From ajsiegel at optonline.net Sun Nov 21 15:52:27 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Nov 21 15:52:37 2004 Subject: [Edu-sig] The Geek Channel In-Reply-To: <20041121043500.EC1B01E4002@bag.python.org> Message-ID: <0I7J00HNOANNZ7@mta9.srv.hcvlny.cv.net> > > Imagine a new Geek Channel on cable or via satellite, where kids can tune > in > to see vid clips of their heroes in the open source community, talking > kernel design, futurism, hardware. Slashdot for television. OSCON 24/7 > (repetitive, like Sesame Street -- segments for different ages, different > shows). Twist in elements from scifi. Get some authors on, like > Vonnegut. > Radical OK. Clowning around OK. Both Python *and* Monty Python. Plenty > to > bliss out on, and for both boyz & girlz. Synchronized websites. Blogs. > > Damian's lecture on thermodynamics, the game of life, and programming > using > a Klingon version of perl -- there's an audience for this kind of thing. > http://www.oreillynet.com/pub/wlg/5304 > > Should we call it the O'Reilly Network? O'Reilly is a very interesting company. What put them over the top in my eyes was when we discovered through a thread here, that they were helping to fund a newsletter that was taking a very skeptical view on the importance of computers in education. It doesn't necessarily mean that anyone at O'Reilly supports that view. It just means that, as far as I can tell, that they felt it important that that side of the debate have some meager resources - considering the resources available to those on the other side of the debate. > > I'd watch, if it were done at all well. I'd even help produce it. I'd > watch Jim Hugunin talking about IronPython, or Tim Peters talking about > anything, over political punditry, any day of the week. And I bet I'm > typical of a big enough demographic to make this channel more than a > little > attractive to advertisers. > There is a fundamental difference, in my mind, between efforts that can be self-sustaining, and efforts that are motivated by profit. Certainly I have no objection to money changing hands in the process. Should an author of an educational text expect to be compensated, should his publisher be in a position to sustain themselves. Of course. Shuttleworth is now directly employing top Debian developers in putting out ubuntu. And there is a corporate entity behind it. Canonical. I don't suspect that Shuttleworth is expecting or willing to fund this effort from his pocket indefinitely. Nor do I suspect he is looking to profit. He apparently does have some ideas about how the effort can become self-sustaining. Finding workable models along these lines is an extremely important effort, which is why I follow it with such interest. Art From nico at teknico.net Sun Nov 21 16:53:34 2004 From: nico at teknico.net (Nicola Larosa) Date: Sun Nov 21 17:43:27 2004 Subject: [Edu-sig] The Geek Channel In-Reply-To: <0I7J00HNOANNZ7@mta9.srv.hcvlny.cv.net> References: <0I7J00HNOANNZ7@mta9.srv.hcvlny.cv.net> Message-ID: <200411211653.36530.nico@teknico.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > O'Reilly is a very interesting company. What put them over the top in my > eyes was when we discovered through a thread here, that they were helping to > fund a newsletter that was taking a very skeptical view on the importance of > computers in education. Steve Talbott's NetFuture is way too interesting to let it be mentioned without a link: http://netfuture.org/ . The view you refer to is put forward by Alliance for Childhood, linked towards the end of NetFuture main page. - -- Nicola Larosa - nico@tekNico.net Asking "Why should I program?" is similar to picking up a shovel and saying "Why should I dig?". Unless you have a need, there is no point, and you will never understand why all those ditch-diggers keep debating the finer points of different shovels. You are out of context. For you, the answer is "You shouldn't". -- claytongulick on Slashdot, Sept. 2004 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBoLoAXv0hgDImBm4RAtPpAKCZ1/qbuGyikUnNBCpkwYW07gRkewCgwUsy bA/OigVGgZw88rJBkM+e0ok= =XbC/ -----END PGP SIGNATURE----- From urnerk at qwest.net Sun Nov 21 18:49:04 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Nov 21 19:15:36 2004 Subject: [Edu-sig] The Geek Channel In-Reply-To: <0I7J00HNOANNZ7@mta9.srv.hcvlny.cv.net> Message-ID: <20041121181535.5D87F1E4002@bag.python.org> > Finding workable models along these lines is an extremely important > effort, which is why I follow it with such interest. > > Art > I didn't get from your reply whether you think a Geek Channel is, in principle, sustainable -- on the basis of advertising revenue, aftermarket DVDs, sponsorships of various kinds. Given we have the food channel, the weather channel, the scifi channel and the comedy channel, I don't see why not, off hand. Anyway, I tried to give a fuller expression of the idea at my blog -- I even cited your remark about more with less in the last sentence. http://worldgame.blogspot.com/2004/11/geek-channel.html Kirby From ajsiegel at optonline.net Sun Nov 21 23:07:44 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Nov 21 23:22:53 2004 Subject: [Edu-sig] The Geek Channel In-Reply-To: <200411211653.36530.nico@teknico.net> Message-ID: <0I7J00IYRUT2VO@mta8.srv.hcvlny.cv.net> > -----Original Message----- > From: edu-sig-bounces+ajsiegel=optonline.net@python.org [mailto:edu-sig- > bounces+ajsiegel=optonline.net@python.org] On Behalf Of Nicola Larosa > Sent: Sunday, November 21, 2004 10:54 AM > To: edu-sig@python.org > Subject: Re: [Edu-sig] The Geek Channel > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > O'Reilly is a very interesting company. What put them over the top in > my > > eyes was when we discovered through a thread here, that they were > helping to > > fund a newsletter that was taking a very skeptical view on the > importance of > > computers in education. > > Steve Talbott's NetFuture is way too interesting to let it be mentioned > without a link: http://netfuture.org/ . The view you refer to is put > forward > by Alliance for Childhood, linked towards the end of NetFuture main page. Thanks for doing this. I returned and subscribed. As I mentioned before, but this time with a link: http://www.anth.org.uk/NCT/ I love the fact that I can make a direct connection (in terms of spheres of influence) between NetFuture and work on Projective Geometry which I have studied happily. The sphere revolves around Rudolph Steiner: http://natureinstitute.org/about/who/steiner.htm It's interesting that in trying to read Steiner directly, I am left with my jaw agape - recognizing nothing. It's nice to think that this is the rare case where the disciples have outdone the Master. Which, I guess, might mean a particularly rare kind of Master. Art From ajsiegel at optonline.net Sun Nov 21 23:15:04 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Nov 21 23:30:10 2004 Subject: [Edu-sig] The Geek Channel In-Reply-To: <0I7J000FIITI11@mta11.srv.hcvlny.cv.net> Message-ID: <0I7J0027QV58NQ@mta6.srv.hcvlny.cv.net> > -----Original Message----- > From: Kirby Urner [mailto:urnerk@qwest.net] > Sent: Sunday, November 21, 2004 12:49 PM > To: 'Arthur'; edu-sig@python.org > Subject: RE: [Edu-sig] The Geek Channel > > > Finding workable models along these lines is an extremely important > > effort, which is why I follow it with such interest. > > > > Art > > > > I didn't get from your reply whether you think a Geek Channel is, in > principle, sustainable -- on the basis of advertising revenue, aftermarket > DVDs, sponsorships of various kinds. Given we have the food channel, the > weather channel, the scifi channel and the comedy channel, I don't see why > not, off hand. What do I know. I would think that the New York market could support a decent radio station - and am apparently wrong. Go for it! Art From ajsiegel at optonline.net Mon Nov 22 15:11:56 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Nov 22 15:12:02 2004 Subject: [Edu-sig] SHIKSHANTAR In-Reply-To: Message-ID: <0I7L00I0N3G0SQ@mta4.srv.hcvlny.cv.net> Robert writes - > > 2) You cannot learn an advanced subject without first learning the > underlying material on which it is dependant. For example, you are > going to find multiplication very difficult if you don't first grasp > addition. Relating this to a goal of general computer literacy: In my class the curriculum would probably be a run through, in stages, of a Linux machine installation. Linux, not on the basis of it being better, easier, free, open - Linux on the basis of its relative transparency and modularity, it's Unix roots, and therefore its seniority. Install minimal, and explore from the shell, etc, etc. Apt-get one's way to more functionality, in stages. Eventually apt-get XWindows, and "startx". And talk, maybe, about how what they are seeing relates to the Windows machine they may have at home, or that their parents may use at work. This approach seems sensible, in the commonsense sense of sensible. Really nothing very innovative or controversial being suggested, one would think. Except that of course it is. Which, again, is the clue of there being something way off kilter. Art From urnerk at qwest.net Mon Nov 22 18:45:14 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Nov 22 18:45:16 2004 Subject: [Edu-sig] SHIKSHANTAR In-Reply-To: <0I7L00I0N3G0SQ@mta4.srv.hcvlny.cv.net> Message-ID: <20041122174516.5CA541E4002@bag.python.org> > Robert writes - > > > > 2) You cannot learn an advanced subject without first learning the > > underlying material on which it is dependant. For example, you are > > going to find multiplication very difficult if you don't first grasp > > addition. > I've read Art's reply, which I think details a sensible approach, definitely. However, there's no one route. I prefer the metaphor of a terrain, and giving students a map. One has many trails through this terrain. You may walk them all eventually, but there'll be forks in the road, with signage we hope, and the teacher won't necessarily push in either direction -- up to each student to choose. When I taught Adventures in Open Source with Jerritt Collard this summer, we started with TCP/IP, explaining how it sits on top of Ethernet, the difference between TCP and UDP, the concept of ports, the concept of daemons connected to these ports, such as Apache on port 80. Even in this domain, one has multiple options, including some which aren't hands on. We were in a police station (West Precinct, Hillsboro), and so Jerritt used these concepts to describe the specific network at hand: a gateway server joining three subnets to the Internet, one along each wall of the room, and one wireless. He also fired up a packet sniffer so kids could watch packets coming and going, e.g. in response to an upline ping, through Comcast (the ISP) of yahoo.com or whatever. It'll be very common for instructors to inherit a classroom with Linux already installed. Although I have subsequently received police permission to wipe machines and start over, with any distro, during this first run we simply accepted RedHat 9 and the Gnome desktop as standard. We didn't go through the steps of installing a distro, although we discussed it, plus talked up the dual boot option, for those sharing a family Windows box at home. Someday, I'll likely walk into a classroom where it's all Mac OS X, already installed. It won't matter much, we'll do what Arthur suggests and open a terminal session and start learning bash. BSD-based OS X is bash-oriented. All the same Unix clone tools are there. Just the desktop isn't Gnome, it's Aqua, and it's very appealing. Judging from trends at OSCON, Powerbooks will be as popular as Linux boxes among Python and Perl programmers, on other tracks as well. I can also teach open source programming on Windows. True, the OS itself is closed, but in an introductory course, which this was, we didn't eyeball kernel source or desktop source, except maybe in passing. There's lots of free source code to play with on any of these three platforms. Pretty soon, we had them inside Python, both in a terminal and in IDLE. We did some muscle training on vi, gave a sense of the multiple IDE options. In a future class, I might have them fire up Eclipse and install the Python plugin, which is coming along. One of my first modules in Python involves two version of 'scissor paper rock'. It's just a command window loop, with the computer asking for S P or R, and coming back with its gamble. Students eyeball the source code while I explain the logic. OK, so Python just follows a pseudo-randomizer, and it loses as often as it wins. The second version cheats, but only sometimes. It actually reads the student answer and comes back with a scissor if it sees paper, a rock if it sees scissors, with paper if it sees a rock. The randomizer controls its answer when it isn't cheating, but also controls when it cheats (and wins). This algorithm has the effect of giving the computer a statistical edge, and after a run of 30 cycles or so, the computer is invariably ahead. However, I provide a .pyc file only, not a .py file. It executes just fine, but the source code isn't there, which is somewhat disturbing. Welcome, to Adventures in Open Source. By Saturday Academy (strong rep in our neck of the woods). In a police station. Just a few miles from Intel (whose engineers love what we do). Kirby From capnregex at gmail.com Mon Nov 22 18:53:21 2004 From: capnregex at gmail.com (Robert Ferney) Date: Mon Nov 22 18:53:23 2004 Subject: [Edu-sig] SHIKSHANTAR In-Reply-To: <0I7L00I0N3G0SQ@mta4.srv.hcvlny.cv.net> References: <0I7L00I0N3G0SQ@mta4.srv.hcvlny.cv.net> Message-ID: On Mon, 22 Nov 2004 09:11:56 -0500, Arthur wrote: > This approach seems sensible, in the commonsense sense of sensible. Really > nothing very innovative or controversial being suggested, one would think. > > Except that of course it is. Which, again, is the clue of there being > something way off kilter. *laughs* Such is the way of change. Of Course, common sense is rarely common. Most people do things the way they have been taught, simply because they have been taught that way, with little or no thought as to if it is a good way of doing it. Or, they don't see how to do it any differently. -Rob From capnregex at gmail.com Mon Nov 22 19:16:17 2004 From: capnregex at gmail.com (Robert Ferney) Date: Mon Nov 22 19:16:19 2004 Subject: [Edu-sig] SHIKSHANTAR In-Reply-To: <2275590629306164117@unknownmsgid> References: <0I7L00I0N3G0SQ@mta4.srv.hcvlny.cv.net> <2275590629306164117@unknownmsgid> Message-ID: On Mon, 22 Nov 2004 09:45:14 -0800, Kirby Urner wrote: > However, there's no one route. I prefer the metaphor of a terrain, and > giving students a map. One has many trails through this terrain. You may > walk them all eventually, but there'll be forks in the road, with signage we > hope, and the teacher won't necessarily push in either direction -- up to > each student to choose. > There are two basic reasons for understanding which principles are prerequisite to other principles.. The first is to be able to map ways to get there from where you are at. The second is to know what principles to review when you have trouble. I saw an example of this while I was assisting in a class of young kids at the local private school where I teach. ( I teach an art class in the afternoons ) The student was learning the principle of borrowing for subtraction. I pulled out some beans to use as counters, and illustrated the principle visually. Then I had the student practice, first with the beans, then on paper. She did just fine with the practice, and I am confident that the principle of borrowing is understood. However, As she was practicing, I noticed that she was still struggling with the more basic skill of being able to subtract numbers larger than 10. Most likely she just needs some practice in that area. After looking at it, it may not be as good of an example as I would have liked, but hopefully yall can see the idea anyway. -Rob From urnerk at qwest.net Mon Nov 22 19:35:17 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Nov 22 19:35:19 2004 Subject: [Edu-sig] SHIKSHANTAR In-Reply-To: Message-ID: <20041122183518.8DE5E1E4002@bag.python.org> Robert Ferney: > There are two basic reasons for understanding which principles are > prerequisite to other principles.. > > The first is to be able to map ways to get there from where you are at. > > The second is to know what principles to review when you have trouble. > Yes, Robert. My previous post wasn't to disagree on the principle of prerequisites. Even given a map of some terrain, we're not saying you may choose to teleport to Lost Lake. There's a definite topology here, and some things invariably come before others (often the key variable is "how steep?"). That being said, there's *still* not just one way to do it (another analogy: IP packets going from remote server to client). Learn some Perl before Python, some Python before Perl, or start with Ruby and skip Perl, then Python, or then Jython, then Java, or do some C# before Java, or forget Java... anyway, you get my point. Kirby From ajsiegel at optonline.net Mon Nov 22 21:12:43 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Nov 22 21:13:30 2004 Subject: [Edu-sig] SHIKSHANTAR In-Reply-To: Message-ID: <0I7L00BY1K5DAS@mta1.srv.hcvlny.cv.net> Robert writes - > On Mon, 22 Nov 2004 09:11:56 -0500, Arthur wrote: > > This approach seems sensible, in the commonsense sense of sensible. > Really > > nothing very innovative or controversial being suggested, one would > think. > > > > Except that of course it is. Which, again, is the clue of there being > > something way off kilter. > > *laughs* > Such is the way of change. Except that you are more the optimist than I if you sense that this is the general direction in which change will in fact take us. At least as to mainstream education. I guess more and more actual education will be happening off-line from the mainstream. As is already happening, one senses. In that sense, I allow myself to be an optimist. But mourn a bit the loss of a more defensible mainstream. There is much crap out on the fringes, and I do hesitate to send kids out there unattended. Best I can articulate the dilemma I see. Art From sandysj at juno.com Mon Nov 22 23:46:19 2004 From: sandysj at juno.com (Jeff Sandys) Date: Mon Nov 22 23:48:27 2004 Subject: [Edu-sig] Re: A better way? Message-ID: <20041122.144704.6458.109098@webmail22.nyc.untd.com> I showed this thread at the SeaPIG meeting and we talked about handling attributes. I pointed out that the dot is an operator and that you can have a space between the dot, and the group didn't believe me until they tried it. >>> s = "my string" >>> s . split() ['my', 'string'] I think by showing the students that dot is an operator helps them understand what is going on and they might not be so concerned about making the long variable and method dotted chains. Thanks, Jeff Sandys ________________________________________________________________ Juno Platinum $9.95. Juno SpeedBand $14.95. Sign up for Juno Today at http://www.juno.com! Look for special offers at Best Buy stores. From inxdr at yahoo.com.au Tue Nov 23 07:05:11 2004 From: inxdr at yahoo.com.au (Darren Payne) Date: Tue Nov 23 07:05:14 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <20041121110006.5F61F1E4015@bag.python.org> Message-ID: <20041123060511.98963.qmail@web54609.mail.yahoo.com> Sorry all - this post will probly stir up a commotion. I have been keen on Python for quite a while. I have tried using it ti teach programming in a high school situation and would have liked to extend into PyGame. Sadly, though I feel I DO understand object oriented concepts, I DO NOT have any idea of determining what objects to create. Similarly, as there is SO MUCH to learn before one becomes capable of completing even simple tasks like a blackjack cardgame (with gui too) ... I am finding students get turned off before they even get a chance to see what can be done. I know ... it must be just me and the way I teach it. However, I have recently revisited Gamemaker. I saw it a few years ago and could not make much sense of it. But now it is up to version 6, there are loads of fantastic tutorials to follow along with. I have introduced it to classes from Yr7 - 10 and they love it whereas only 2 - 3 of the really "nerdy", "geeky" kids appreciated Python! My feeling is that Python will never be widely used (in schools) unless we can get a PyGamemaker package. Even girls have a ball with gamemaker! regards Darren ===== ----------------------------------------------------------------------------------- regards Darren Payne Hurlstone Agricultural High School Ph: 9829 9222 Fax: 98292026 __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From ajsiegel at optonline.net Tue Nov 23 12:53:28 2004 From: ajsiegel at optonline.net (Arthur) Date: Tue Nov 23 12:53:37 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <20041123060511.98963.qmail@web54609.mail.yahoo.com> Message-ID: <0I7M00ME7RPB8P@mta2.srv.hcvlny.cv.net> Darren writes - > Sorry all - this post will probly stir up a commotion. I've been stirring up a commotion here for some time by suggesting the possibility that Python is too rich and complex a tool to be realistically taught and appreciated by students of the age you are trying to teach who are not predisposed to some "geekiness". So maybe if I am correct, you have been trying to bang your head against the wall, a bit. But to what extent are you fulfilling your mission to teach programming by using Gamemaker? Its a question, not a provocation, since I don't know the program. Do you ever get to something that can be considered, fairly, to be programming? PyGeo is (better, will be) of course the perfect alternative ;) The GUI is all pre-built (thanks to VPython). Its API is a narrow (and realistically absorbable) subset of the full range of possibilities. And to the extent it fails as a tool in teaching something about programming, it might succeed in teaching something about geometry, and vice versa. A better hedge in an educational environment, IMO. And there is no reason it shouldn't be fun. Nice and colorful 3d. I do believe fun should be part of the equation. Just thought I'd venture out of the closet on the possibilities of PyGeo, as I begin to focus some of my resources on it again. I was successful in finding someone quite qualified to help me (as a paid consultant) in the technical aspects of preparing decent distributions. We'll see. Art > > I have been keen on Python for quite a while. I have > tried using it ti teach programming in a high school > situation and would have liked to extend into PyGame. > Sadly, though I feel I DO understand object oriented > concepts, I DO NOT have any idea of determining what > objects to create. Similarly, as there is SO MUCH to > learn before one becomes capable of completing even > simple tasks like a blackjack cardgame (with gui too) > ... I am finding students get turned off before they > even get a chance to see what can be done. I know ... > it must be just me and the way I teach it. However, I > have recently revisited Gamemaker. I saw it a few > years ago and could not make much sense of it. But now > it is up to version 6, there are loads of fantastic > tutorials to follow along with. I have introduced it > to classes from Yr7 - 10 and they love it whereas only > 2 - 3 of the really "nerdy", "geeky" kids appreciated > Python! > My feeling is that Python will never be widely used > (in schools) unless we can get a PyGamemaker package. > Even girls have a ball with gamemaker! > > regards > Darren > > ===== > -------------------------------------------------------------------------- > --------- > regards > Darren Payne > Hurlstone Agricultural High School > Ph: 9829 9222 Fax: 98292026 > > > > > > __________________________________ > Do you Yahoo!? > The all-new My Yahoo! - Get yours free! > http://my.yahoo.com > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig From urnerk at qwest.net Tue Nov 23 14:10:38 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Nov 23 14:10:41 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <0I7M00ME7RPB8P@mta2.srv.hcvlny.cv.net> Message-ID: <20041123131039.BE0961E4002@bag.python.org> Arthur: > But to what extent are you fulfilling your mission to teach programming by > using Gamemaker? Its a question, not a provocation, since I don't know > the program. > > Do you ever get to something that can be considered, fairly, to be > programming? FYI, Gamemaker does expose a coding layer that requires some Java-like programming. It also does a lot out of the box at the click and drag level -- then you can see what you've wrought in terms of code (the palette-driven GUI design motif, applied to dynamic interfaces). At Saturday Academy, Gamemaker is a well established offering and the word of mouth on it is positive, i.e. kids learn from other kids that this is a fun course or courses (I think we might have a beginner and advanced level -- you'd have to check the catalog). It serves as a motivator towards programming, in that eventually you become frustrated with the limitations of the point and click constructions, and the teacher says "OK, you'll need to start learning this OO language then." Some kids drop out right there -- others stick with it. A possible drawback of Gamemaker (I should be corrected if I'm wrong) is that the OO language you need to learn isn't specifically any of the mainstream languages -- it's Gamemaker language, which is Java-like but not Java. Did I get that right? The Satacad instructor (Edwin Pilobello) gave me a quick tour of the package awhile back and this is all I'm going on. Even if that's right, this isn't a super-serious draw back. You get your feet wet in a Java-like language. How bad can that be? My approach to teaching Python is to mix it with a different knowledge domain, but not GUI game making (not that I have any problem with PyGame, but that's not so friendly to newbies as GameMaker). I lean towards using mathematics as my place to cut new programming teeth. At first glance, that sounds like a real turn off. Doesn't it just take the fun out of programming to tie it to a boulder like math, and throw it off a bridge. We just sink to the bottom, right? But look at it this way: they want you to learn quite a bit of math *anyway* (the boulder is a given) and approaching the stuff while learning Python makes the math more fun. In other words *given* math is important, Python has way more to offer in the fun department than just graphing calculators. I think of PyGeo is fitting somewhere in between these two extremes. My math stuff tends to be pretty stark, pretty austere, although I too phase towards visuals with POV-Ray and VPython. PyGeo gives students an interactive command line for creating dynamic interfaces (like GameMaker does), but with stronger ties to mathematics (projective geometry and such). Then at the other extreme you have GameMaker, where you've cut loose from formal math and have to think of some rules that might actually make for a fun experience, i.e. the challenge is to come up with something worth playing (an art in itself). Another approach in which I've been successful with Python is mixing it in as one tool among many in a kind of open source work shop. We're in this bicycle shop (metaphor for Unix-like work bench) and want to know how to fix and assemble bicycles. Python lets you script stuff -- an alternative to bash scripting (Perl got off the ground here too). Python lets you throw together some cgi (e.g. the calendar example). In both applications (scripting and cgi), working in Python helps you learn this new knowledge domain (just like it helped you learn math). You become acclimated to a whole range of new concepts. Note that we're not doing 100% Python programming here. We're getting used to a context, a set of tools. Synergy is key -- always has been in Unix-like worlds (many special purpose tools with orthogonal relationships, like Python itself, sort of). Kirby From ajsiegel at optonline.net Tue Nov 23 15:13:54 2004 From: ajsiegel at optonline.net (Arthur) Date: Tue Nov 23 15:14:28 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <0I7M00HXTV9QGL@mta14.srv.hcvlny.cv.net> Message-ID: <0I7M00MSJY7GCV@mta3.srv.hcvlny.cv.net> Kirby writes - > > FYI, Gamemaker does expose a coding layer that requires some Java-like > programming. It also does a lot out of the box at the click and drag > level > -- then you can see what you've wrought in terms of code (the palette- > driven > GUI design motif, applied to dynamic interfaces). I've confessed to appreciating click and drag SQL statement creation, as long as I can see and edit the result. Sounds like this is in the same ballpark. And while doing more and more of my SQL statements in straight text at this point in the game, I'll reluctantly confess that I probably wouldn't have gotten to where I am with this were not some gentle interface available to help me to make the transition. I think this recent article on the "IDE Divide" may have some relevance here: http://osteele.com/archives/2004/11/ides > > My approach to teaching Python is to mix it with a different knowledge > domain, but not GUI game making (not that I have any problem with PyGame, > but that's not so friendly to newbies as GameMaker). > > I lean towards using mathematics as my place to cut new programming teeth. > At first glance, that sounds like a real turn off. Doesn't it just take > the > fun out of programming to tie it to a boulder like math, and throw it off > a > bridge. We just sink to the bottom, right? But look at it this way: > they > want you to learn quite a bit of math *anyway* (the boulder is a given) > and > approaching the stuff while learning Python makes the math more fun. In > other words *given* math is important, Python has way more to offer in the > fun department than just graphing calculators. As I think you know, I like your approach. Going further, I find it difficult to justify any general emphasis on programming as a general subject area *except* to the extent that it is considered, and used as, a skill that is leveraged to enhance other fundamental curricula goals. Mathematics is the sensible starting point. The "we are giving kids the skills to organize their CD collections" argument that I've heard more than once, doesn't cut it, as far as I am concerned. > I think of PyGeo is fitting somewhere in between these two extremes. I appreciate you saying that. Because I have become a great fan of the middle road. And if you feel PyGeo reflects that, I'm glad. Though there is nothing sexy about the middle road, I've already sown my oats. How many years of being sexy could I stand ? ;) Art From mats at laplaza.org Sat Nov 13 17:04:08 2004 From: mats at laplaza.org (Mats Wichmann) Date: Tue Nov 23 17:26:21 2004 Subject: [Edu-sig] Ubuntu In-Reply-To: <1099238017.22981.15.camel@localhost.localdomain> References: <1099238017.22981.15.camel@localhost.localdomain> Message-ID: <6.1.2.0.1.20041114145340.027471e0@mail.laplaza.org> >I was meaning to try Ubuntu anyway. > >http://www.ubuntulinux.org/ > >Ubuntu is a 1 CD debian based Linux desktop. > >I think Mark Shuttleworth has something to do with its creation. Anyway >its Python friendly. A little slow on getting to comment here. Yes, Mark is behind Ubuntu. And it's not just Python "friendly", it aims to be an easy-to-use acessible Linux distribution where they've specifically chosen Python as the programming language. There are some nifty projects that Ubuntu is offering "bounties" for completing - it's worth a look on the site. All to be delivered in Python. I heard Mark speak about Ubuntu at LinuxWorld in Frankfurt a few weeks ago. After going into space he wanted to try something /really/ hard :-) and Ubuntu is it .... and there are some wonderful educational programs that his foundation is using this for. >Beyond that - it ends up putting me onto a gnome desktop that's >extremely sparse and extremely pleasing. I'm relatively impressed too. And this sort of thing is the goal of the project - to get an accessible distribution in the hands of folks who have no idea what all is out there in the open source world. From Brent.Burley at disney.com Tue Nov 23 19:42:05 2004 From: Brent.Burley at disney.com (Burley, Brent) Date: Tue Nov 23 19:42:38 2004 Subject: [Edu-sig] Re: teaching Python In-Reply-To: <20041123110003.9B3CD1E4004@bag.python.org> References: <20041123110003.9B3CD1E4004@bag.python.org> Message-ID: <41A3847D.6000800@disney.com> > Darren Payne wrote: > > I have been keen on Python for quite a while. I have > tried using it to teach programming in a high school > situation and would have liked to extend into PyGame. > Sadly, though I feel I DO understand object oriented > concepts, I DO NOT have any idea of determining what > objects to create. These might help: Teaching Programming with Python and PyGame http://tech.canterburyschool.org/pycon/ Creating Games with Pygame http://www.linuxjournal.com/article/7694 From john.zelle at wartburg.edu Tue Nov 23 20:00:42 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Tue Nov 23 20:01:36 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <20041123060511.98963.qmail@web54609.mail.yahoo.com> References: <20041123060511.98963.qmail@web54609.mail.yahoo.com> Message-ID: <41A388DA.4070003@wartburg.edu> Darren, Teaching programming is not easy, but it can be very rewarding. My experience is in teaching at the college level, but I think what I have learned would also be good at the high school level. Darren Payne wrote: >Sorry all - this post will probly stir up a commotion. > >I have been keen on Python for quite a while. I have >tried using it ti teach programming in a high school >situation and would have liked to extend into PyGame. >Sadly, though I feel I DO understand object oriented >concepts, I DO NOT have any idea of determining what >objects to create. Similarly, as there is SO MUCH to >learn before one becomes capable of completing even >simple tasks like a blackjack cardgame (with gui too) > > Some on this list have suggested that Python is "too rich" to be good language for young or first-time programmers. I cannot agree with this. Yes, Python is a real-world language, but what makes it so useful in the real-world is its simplicity and clean design. All general purpose languages are powerful. Python is one of the easiest to learn. That said, programming _is_ hard. Not everyone can do it well, but my experience has been that anyone who really tries can learn to do useful things with Python. In my introductory class, we teach real programming in Python. I use a simple graphics package that allows students to play with graphics objects in a simple way. This keeps them motivated, and by the end of the semester, they can program an interactive Blackjack game with a simple GUI. I've used that project several times, this semester we're doing mastermind. >... I am finding students get turned off before they >even get a chance to see what can be done. I know ... >it must be just me and the way I teach it. > The key here is finding interesting problems (or problems that can be made interesting) that don't necessarily require a lot of code. Different students find different things interesting, but I have found that virtually all of them seem to groove on some simple graphics programming. >However, I >have recently revisited Gamemaker. I saw it a few >years ago and could not make much sense of it. But now >it is up to version 6, there are loads of fantastic >tutorials to follow along with. > I don't know much about Gamemaker, but what little I have seen suggests to me that learning it may be fun, but does not teach the students very much of lasting value. Do they learn underlying principles of computing such as how data is represented, and what problems can be solved algorithmically? Do they learn anything at all that they can take away and apply to something besides making games in gamemaker? I don't know the answer to these questions, but I suspect it's "no." >I have introduced it >to classes from Yr7 - 10 and they love it whereas only >2 - 3 of the really "nerdy", "geeky" kids appreciated >Python! >My feeling is that Python will never be widely used >(in schools) unless we can get a PyGamemaker package. > > Games are nice to generate interest, but there are other interesting avenues as well. Graphical programs of all sorts, simulations, even numerical programs, if properly motivated can prove interesting. For example a discussion of what factorial means in terms of rearrangements followed by an algorithm and demonstration can actually keep a lot of students very interested. They get a real kick out of computing 100! (easy to do in Python, not so in other languages). Simple chaotic programs are another example, if you introduce things like the butterfly effect, even a simple sequence of numbers can be interesting. Now the shameless plug. If you are interested in using Python to really teach programming and computer science to high school students, take a look at my book: "Python Programming: An Introduction to Computer Science." Quite a number of high schools having been using it with good success. Programming is not all fun and games, but it's "hard fun" as has been said many times in this group. >Even girls have a ball with gamemaker! > > This is an interesting comment. In CS education we wrestle with how to get more girls involved with computers and programming. At many conferences I've been to, female presenters have argued that girls and young women are turned off by game-oriented projects. That has not been my experience, and apparently not yours, either. Just my 2 cents. --John From andre.roberge at ns.sympatico.ca Tue Nov 23 22:31:47 2004 From: andre.roberge at ns.sympatico.ca (=?ISO-8859-1?Q?Andr=E9_Roberge?=) Date: Tue Nov 23 22:31:44 2004 Subject: [Edu-sig] Re: Teaching Python Message-ID: <41A3AC43.90108@ns.sympatico.ca> How about using Guido van Robot (gvr.sourceforge.net) ? I have sort of joined the project a couple of months ago. GvR is now moving to "phase 2", where one can use the full power of Python to extend what was done in the original project. I'm planning to use it to teach my kids (grades 6 and 8) about programming in Python. Andr? Roberge From ajsiegel at optonline.net Wed Nov 24 03:41:11 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Nov 24 03:41:25 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <41A388DA.4070003@wartburg.edu> Message-ID: <0I7N00I2AWSZ8I@mta3.srv.hcvlny.cv.net> John writes - > Some on this list have suggested that Python is "too rich" to be good > language for young or first-time programmers. That some, as far as I can tell, might only be me. But if it is, if can't be. I have given witness to having been a first-time programmer who learned enough from my experience working with Python to now get paid for doing development work. And then there is the question of defining young. If we leave the term vague enough, we can allow ourselves to both be right. But you teach college and target your text to high schoolers (and up). Darren was targeting 7th to 10th, Unless you know something I don't about the Australian school system, those seem to me to be very different matters. You would be carving out a very exceptional niche for programming curriculum by claiming that the same text appropriate to 11th and 12th graders is also appropriate for 7th and 8th. I would insist that I am being more careful in my remarks than you might want to believe. >I cannot agree with this. > Yes, Python is a real-world language, but what makes it so useful in the > real-world is its simplicity and clean design. All general purpose > languages are powerful. Python is one of the easiest to learn. That > said, programming _is_ hard. Not everyone can do it well, but my > experience has been that anyone who really tries can learn to do useful > things with Python. I happen to be someone who really tried. And I am all for allowing us to assume we are talking about folks motivated to learn, in all cases of our discussions. It is more when we - I am not sure what we I am referring to here - get off on how to hocus-pocus folks into learning, and what language design issues prevent folks who don't care to learn, from learning - that I tend to mouth off a bit. Art From inxdr at yahoo.com.au Wed Nov 24 06:56:04 2004 From: inxdr at yahoo.com.au (Darren Payne) Date: Wed Nov 24 06:56:07 2004 Subject: [Edu-sig] Re: gamemaker In-Reply-To: <20041124024129.012F31E400C@bag.python.org> Message-ID: <20041124055604.2911.qmail@web54607.mail.yahoo.com> Thanks to everyone who replied to my last post re gamemaker. I have gained some good ideas and food for thought. BTW - I believe gamemaker is programmed in delphi - so I guess to extend it (use it at an advanced level) would require using delphi? (delphi is a pascal derivative). regards Darren --- edu-sig-request@python.org wrote: > Send Edu-sig mailing list submissions to > edu-sig@python.org > > To subscribe or unsubscribe via the World Wide Web, > visit > http://mail.python.org/mailman/listinfo/edu-sig > or, via email, send a message with subject or body > 'help' to > edu-sig-request@python.org > > You can reach the person managing the list at > edu-sig-owner@python.org > > When replying, please edit your Subject line so it > is more specific > than "Re: Contents of Edu-sig digest..." > > > Today's Topics: > > 1. RE: teaching Python (Arthur) > 2. RE: teaching Python (Kirby Urner) > 3. RE: teaching Python (Arthur) > 4. Re: Ubuntu (Mats Wichmann) > 5. Re: teaching Python (Burley, Brent) > 6. Re: teaching Python (John Zelle) > 7. Re: Teaching Python (Andr? Roberge) > 8. RE: teaching Python (Arthur) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 23 Nov 2004 06:53:28 -0500 > From: Arthur > Subject: RE: [Edu-sig] teaching Python > To: 'Darren Payne' , > edu-sig@python.org > Message-ID: <0I7M00ME7RPB8P@mta2.srv.hcvlny.cv.net> > Content-Type: text/plain; charset=us-ascii > > Darren writes - > > > Sorry all - this post will probly stir up a > commotion. > > I've been stirring up a commotion here for some time > by suggesting the > possibility that Python is too rich and complex a > tool to be realistically > taught and appreciated by students of the age you > are trying to teach who > are not predisposed to some "geekiness". > > So maybe if I am correct, you have been trying to > bang your head against the > wall, a bit. > > But to what extent are you fulfilling your mission > to teach programming by > using Gamemaker? Its a question, not a provocation, > since I don't know the > program. > > Do you ever get to something that can be considered, > fairly, to be > programming? > > PyGeo is (better, will be) of course the perfect > alternative ;) The GUI is > all pre-built (thanks to VPython). Its API is a > narrow (and realistically > absorbable) subset of the full range of > possibilities. And to the extent it > fails as a tool in teaching something about > programming, it might succeed in > teaching something about geometry, and vice versa. > A better hedge in an > educational environment, IMO. And there is no > reason it shouldn't be fun. > Nice and colorful 3d. I do believe fun should be > part of the equation. > > Just thought I'd venture out of the closet on the > possibilities of PyGeo, as > I begin to focus some of my resources on it again. > I was successful in > finding someone quite qualified to help me (as a > paid consultant) in the > technical aspects of preparing decent distributions. > > We'll see. > > Art > > > > > > > > I have been keen on Python for quite a while. I > have > > tried using it ti teach programming in a high > school > > situation and would have liked to extend into > PyGame. > > Sadly, though I feel I DO understand object > oriented > > concepts, I DO NOT have any idea of determining > what > > objects to create. Similarly, as there is SO MUCH > to > > learn before one becomes capable of completing > even > > simple tasks like a blackjack cardgame (with gui > too) > > ... I am finding students get turned off before > they > > even get a chance to see what can be done. I know > ... > > it must be just me and the way I teach it. > However, I > > have recently revisited Gamemaker. I saw it a few > > years ago and could not make much sense of it. But > now > > it is up to version 6, there are loads of > fantastic > > tutorials to follow along with. I have introduced > it > > to classes from Yr7 - 10 and they love it whereas > only > > 2 - 3 of the really "nerdy", "geeky" kids > appreciated > > Python! > > My feeling is that Python will never be widely > used > > (in schools) unless we can get a PyGamemaker > package. > > Even girls have a ball with gamemaker! > > > > regards > > Darren > > > > ===== > > > -------------------------------------------------------------------------- > > --------- > > regards > > Darren Payne > > Hurlstone Agricultural High School > > Ph: 9829 9222 Fax: 98292026 > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > The all-new My Yahoo! - Get yours free! > > http://my.yahoo.com > > > > > > _______________________________________________ > > Edu-sig mailing list > > Edu-sig@python.org > > http://mail.python.org/mailman/listinfo/edu-sig > > > > > ------------------------------ > > Message: 2 > Date: Tue, 23 Nov 2004 05:10:38 -0800 > From: "Kirby Urner" > Subject: RE: [Edu-sig] teaching Python > To: "'Arthur'" , "'Darren > Payne'" > , edu-sig@python.org > Message-ID: > <20041123131039.BE0961E4002@bag.python.org> > Content-Type: text/plain; charset="us-ascii" > > Arthur: > > But to what extent are you fulfilling your mission > to teach programming by > > using Gamemaker? Its a question, not a > provocation, since I don't know > > the program. > > > > Do you ever get to something that can be > considered, fairly, to be > > programming? > > FYI, Gamemaker does expose a coding layer that > requires some Java-like > programming. It also does a lot out of the box at > the click and drag level > -- then you can see what you've wrought in terms of > code (the palette-driven > GUI design motif, applied to dynamic interfaces). > > === message truncated === ===== ----------------------------------------------------------------------------------- regards Darren Payne Hurlstone Agricultural High School Ph: 9829 9222 Fax: 98292026 __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail From dajoy at openworldlearning.org Wed Nov 24 14:18:55 2004 From: dajoy at openworldlearning.org (Daniel Ajoy) Date: Wed Nov 24 14:19:36 2004 Subject: [Edu-sig] teaching Python Message-ID: <41A443EF.10380.8ADAAA4@localhost> Kirby wrote: > I lean towards using mathematics as my place to cut new > programming teeth. At first glance, that sounds like a real > turn off. Doesn't it just take the fun out of programming > to tie it to a boulder like math, and throw it off a > bridge. We just sink to the bottom, right? But look at it > this way: they want you to learn quite a bit of math > *anyway* (the boulder is a given) and approaching the stuff > while learning Python makes the math more fun. In other > words *given* math is important, Python has way more to > offer in the fun department than just graphing calculators. I have prepared a series of "programming challenges" for a Logo programming environment. They are just geometric pictures that I suggest students try to mimic. The first ones are very simple. The first one, for example, is the classic first Logo "program": to square forward 100 right 90 forward 100 right 90 forward 100 right 90 forward 100 right 90 end or to square repeat 4 [forward 100 right 90] end But in #14 the student might want to know the relationship between the diameter of a circle and its perimeter. In #21 the student might want to know how to make squares of different sizes, like: to square :size repeat 4 [forward :size right 90] end square 80 left 90 square 40 left 90 square 20 left 90 square 10 left 90 In #22 the student might want to know the Pitagorean theorem, and for #33 it would be good to know how to program loops. For the last few ones, things become easier if the student understands the concept of derivative. http://mondragon.angeltowns.net/paradiso/Construcciones.html John writes - > Some on this list have suggested that Python is "too rich" to be good > language for young or first-time programmers. I think I was one. The thought went like this: "why would I want to program something in Python, if it's probably already programmed somewhere in the libraries or in the Internet" It is a little bit discouraging to know that you'll be either just programming glue code and doing a lot of digging for the right code, or reinventing the wheel. Daniel From john.zelle at wartburg.edu Wed Nov 24 15:54:37 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Wed Nov 24 15:55:41 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <0I7N00I2AWSZ8I@mta3.srv.hcvlny.cv.net> References: <0I7N00I2AWSZ8I@mta3.srv.hcvlny.cv.net> Message-ID: <41A4A0AD.1080606@wartburg.edu> Arthur wrote: >John writes - > > > >>Some on this list have suggested that Python is "too rich" to be good >>language for young or first-time programmers. >> >> > >That some, as far as I can tell, might only be me. > > >But if it is, if can't be. > > That's a great line. I was thinking of some comments you have made, but not you alone (see other responses on this thread). My only point here is that, while there are occasional pitfalls for new programmers, my experience has been that Python is absolutely one of the best beginner languages. The complexity lamented in Daniel's original post is either a function of the environment being used or inherent to programming, not an artifact of Python. Sorry if I raised any hackles but indirectly accusing anyone of being "some." >I have given witness to having been a first-time programmer who learned >enough from my experience working with Python to now get paid for doing >development work. > >And then there is the question of defining young. If we leave the term >vague enough, we can allow ourselves to both be right. But you teach college >and target your text to high schoolers (and up). Darren was targeting 7th >to 10th, > This is an excellent point. I don't have any direct experience with students below 9th grade. The maturity level here could make a big difference. Last time I checked, 10 grade was still high school. >Unless you know something I don't about the Australian school >system, those seem to me to be very different matters. > I'm relatively certain that Australian schools can't be any worse than US schools (at least if performance standardized tests in reading, writing, and mathematics are used a gauage). >You would be carving >out a very exceptional niche for programming curriculum by claiming that the >same text appropriate to 11th and 12th graders is also appropriate for 7th >and 8th. I would insist that I am being more careful in my remarks than you >might want to believe. > > Yes, you are being more careful. I'm simply saying that a real intro to programming is not beyond the intellectual maturity of the average high school student (grades 9-12). Here in Iowa, 10-15 years ago, most high schools offered such a course. These days they are rare; sadly they have been replaced by word-processing, and web-page design classes. >>I cannot agree with this. >>Yes, Python is a real-world language, but what makes it so useful in the >>real-world is its simplicity and clean design. All general purpose >>languages are powerful. Python is one of the easiest to learn. That >>said, programming _is_ hard. Not everyone can do it well, but my >>experience has been that anyone who really tries can learn to do useful >>things with Python. >> >> > >I happen to be someone who really tried. And I am all for allowing us to >assume we are talking about folks motivated to learn, in all cases of our >discussions. > We are, of course in agreement here. But I am also including as "trying" those who might not be all that excited about programming, but who still give the class an honest effort. We have a lot of freshman who take our CS1 class to fullfill a gen. ed. math requirement. Even though they might not be motivated by the material, they still want to get a decent grade. They can be and are successful. > >It is more when we - I am not sure what we I am referring to here - get off >on how to hocus-pocus folks into learning, and what language design issues >prevent folks who don't care to learn, from learning - that I tend to mouth >off a bit. > > And I tend to agree with those assessments. --John From john.zelle at wartburg.edu Wed Nov 24 16:10:29 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Wed Nov 24 16:11:27 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <20041124053917.23476.qmail@web54601.mail.yahoo.com> References: <20041124053917.23476.qmail@web54601.mail.yahoo.com> Message-ID: <41A4A465.1000801@wartburg.edu> Darren, Just a very quick note here. This is interesting background to your post, much appreciated. Darren Payne wrote: >Thanks for taking the time to reply to my post. >I am very (very) fortunate - I teach in one of our > >gets in the way for about 3 months! After this I >turned to Python and have used your book along with >Michael Dawson's book. These classes progress very >slowly - so we have only reached doing somehting with >your graphics.py by the end of a 10 week term. > This is a problem with the published form of my book. During the review process, there is a tendency to add material to make some sections "more complete." There is tremendous pressure here, due fear that if you leave out something mentioned by any reviewer, you are losing potential adoptions. The end result is that what starts as a nice focused book turns into a bloated paper doorstop. While my book is less bloated than the average intro book, it's still not as slim as I'd like. When I teach the class, I try to get to graphics very quickly. I do that by skipping or skimming large chunks of material in the beginning of the book. I don't dwell on chapters 1 and 2, since those topics will recurr over and over again. I simply skip much of Chapter 4, just covering the basic string operations. In fact, you could easily skip the entire chapter and just jump to graphics. I think the younger my audience, the quicker I would go to Chapter 5. > I keep >arguing with myself trying to work out how to get the >students doing more rather than me having to work it >out and then show them every step - but if i don't do >the latter they just sit there and play on the >internet. > >So now I have turned to gamemaker. You are >corect with regards algorithms and data representation >etc .... however I am making great use of the >tutorials from the gamemaker. Students are given these >to work through and "DO" using different sprites, >sounds etc. The good thing is the really keen kids are >asking questions that "require" them to learn what you >talk of. In short Python / Java - whole bunch of stuff >to learn and be quite good at before we can "DO" >something interesting. Gamemaker - "DO" interesting >stuff straight up ... but if you want to tweak it in >any way ... then you have to learn data structures, >variables, OO, data representation etc. > > > This and Kirby's post have convinved me that, at least for your better students, Gamemaker is giving them something of lasting value. If it piques their curiousity about programming, maybe you can at least get some of them pointed to computing studies later in their academic careers. --John From glingl at aon.at Wed Nov 24 23:35:32 2004 From: glingl at aon.at (Gregor Lingl) Date: Wed Nov 24 23:35:12 2004 Subject: [Edu-sig] Re: Teaching Python In-Reply-To: <41A3AC43.90108@ns.sympatico.ca> References: <41A3AC43.90108@ns.sympatico.ca> Message-ID: <41A50CB4.1090602@aon.at> Andr? Roberge schrieb: > How about using Guido van Robot (gvr.sourceforge.net) ? > I'd like to do this with my students on windows(XP) machines. But when trying to install it i've got some problems: I downloaded the Windows installer gvr-1.1_win32.exe as well as the zipped archive gvr-1.1.zip (In fact I did several downloads from different mirrors) Both don't work on my machine: The Windows-installer exits immediately, strangely complaining: This program must be run under Win32 Trying to unzip the archive with Winzip results invariably (with all different downloads) in the message: There are 712 bytes missing in the zip-file and consequently Winzip is unable to process it. Did anybody experience similar problems? Does anybody know how to overcome them? Regards, Gregor From ajsiegel at optonline.net Thu Nov 25 15:15:22 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Nov 25 15:15:28 2004 Subject: [Edu-sig] Python and statistics Message-ID: <0I7Q0047DNLQGA@mta3.srv.hcvlny.cv.net> My son is coming home from college for the long weekend, and in our last conversation mentioned that the only thing standing in the way of him achieving the kinds of grades he would like to see for himself is the trouble he is having in his Statistcs class, and that maybe I could work with him on it over the weekend. An unusual request, from him. He must be desperate ;) Truth is, I have little feel for the subject - beyond having done adequately in a class 30 years ago in business school. Nor do I have a particular interest in the subject. But a father's duty calls... I am hoping to at least explore the possibility of subcontracting some this job to Python. I know there are many possibilities, and a number of modules available that could come into play. If anyone has any specific ideas, particularly where the goal is to use Python to assist in grasping the concepts of a typical introductory college Statistics class - their input would be appreciated. Art From andre.roberge at ns.sympatico.ca Thu Nov 25 18:47:08 2004 From: andre.roberge at ns.sympatico.ca (=?ISO-8859-1?Q?Andr=E9_Roberge?=) Date: Thu Nov 25 18:47:11 2004 Subject: [Edu-sig] Problem with GvR fixed Message-ID: <41A61A9C.809@ns.sympatico.ca> For those interested, I want to report that the problem that Gregor Lingl encountered while trying to download version 1.1 of GvR (on sourceforge) has been fixed (by someone other than me). Shameless plug: GvR is, imho, a great way to introduce programming concepts to children (ages 10+). It's origin can be traced to a program called Karel the Robot which has been adapted by some universities to teach C++ or Java. A new version of GvR is in the works that will allow a smooth transition from the limited number of instructions in the original version to giving full access to all of Python structures. Andr? Roberge From mrmrmr50 at yahoo.com Thu Nov 25 21:26:50 2004 From: mrmrmr50 at yahoo.com (mike re-v) Date: Thu Nov 25 21:26:53 2004 Subject: [Edu-sig] Thanksgiving Message-ID: <20041125202650.57590.qmail@web21202.mail.yahoo.com> hi Thanks for a great list re-v __________________________________ Do you Yahoo!? The all-new My Yahoo! - What will yours do? http://my.yahoo.com From jmillr at umich.edu Fri Nov 26 22:54:43 2004 From: jmillr at umich.edu (John Miller) Date: Fri Nov 26 22:54:51 2004 Subject: [Edu-sig] Python and statistics In-Reply-To: <20041126110003.DFBDE1E400B@bag.python.org> References: <20041126110003.DFBDE1E400B@bag.python.org> Message-ID: I just happened on this message from the python-tutors list and thought it might be of interest. I haven't used R or RPy at all. John Miller > Message: 10 > Date: Sat, 27 Nov 2004 00:15:20 +0430 > From: "Lee Harr" > Subject: [Tutor] Re: Python and statistics > To: tutor@python.org > >> If anyone has any specific ideas, particularly where the goal is to >> use >> Python to assist in grasping the concepts of a typical introductory >> college >> Statistics class - their input would be appreciated. >> > > > I have been playing with pyr -- python bindings to the R statistics > package: > http://www.r-project.org/ > http://rpy.sourceforge.net/ > > Way more statistics power than I will (hopefully ;o) ever need. On Nov 26, 2004, at 6:00 AM, Arthur wrote: > My son is coming home from college for the long weekend, and in our > last > conversation mentioned that the only thing standing in the way of him > achieving the kinds of grades he would like to see for himself is the > trouble he is having in his Statistcs class, and that maybe I could > work > with him on it over the weekend. > > An unusual request, from him. He must be desperate ;) > > Truth is, I have little feel for the subject - beyond having done > adequately > in a class 30 years ago in business school. Nor do I have a particular > interest in the subject. > > But a father's duty calls... > > I am hoping to at least explore the possibility of subcontracting some > this > job to Python. I know there are many possibilities, and a number of > modules > available that could come into play. > > If anyone has any specific ideas, particularly where the goal is to use > Python to assist in grasping the concepts of a typical introductory > college > Statistics class - their input would be appreciated. > > Art From missive at hotmail.com Sat Nov 27 17:17:27 2004 From: missive at hotmail.com (Lee Harr) Date: Sat Nov 27 17:18:06 2004 Subject: [Edu-sig] Re: Python and statistics Message-ID: >I just happened on this message from the python-tutors list and thought >it might be of interest. I haven't used R or RPy at all. > Thanks for forwarding that... I got my lists mixed up :o) _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From ajsiegel at optonline.net Sat Nov 27 17:18:13 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Nov 27 17:18:21 2004 Subject: [Edu-sig] Python and statistics In-Reply-To: Message-ID: <0I7U00026IMJ2Z@mta10.srv.hcvlny.cv.net> > -----Original Message----- > From: edu-sig-bounces@python.org [mailto:edu-sig-bounces@python.org] On > Behalf Of John Miller > Sent: Friday, November 26, 2004 4:55 PM > To: edu-sig@python.org > Subject: Re: [Edu-sig] Python and statistics > > I just happened on this message from the python-tutors list and thought > it might be of interest. I haven't used R or RPy at all. > > John Miller Thanks. I was also pointed to this resource: http://salstat.sunsite.dk/ which is one that is interesting also in light of recent discussion here - in that the author's more direct interest is HCI, and this project's motivation is connected to an effort to improve on what the author perceives to be interface weaknesses in commercially designed Statistics packages. The general situation here reinforces some my idea about there being something of a glut, rather than a paucity, of resources. Specifying one particular programming language, and one relatively narrow subject area, the existing possibilities are enormous. Not something to complain about, obviously. But it does complicate matters some. Art > > > Message: 10 > > Date: Sat, 27 Nov 2004 00:15:20 +0430 > > From: "Lee Harr" > > Subject: [Tutor] Re: Python and statistics > > To: tutor@python.org > > > >> If anyone has any specific ideas, particularly where the goal is to > >> use > >> Python to assist in grasping the concepts of a typical introductory > >> college > >> Statistics class - their input would be appreciated. > >> > > > > > > I have been playing with pyr -- python bindings to the R statistics > > package: > > http://www.r-project.org/ > > http://rpy.sourceforge.net/ > > > > Way more statistics power than I will (hopefully ;o) ever need. > > On Nov 26, 2004, at 6:00 AM, Arthur wrote: > > > My son is coming home from college for the long weekend, and in our > > last > > conversation mentioned that the only thing standing in the way of him > > achieving the kinds of grades he would like to see for himself is the > > trouble he is having in his Statistcs class, and that maybe I could > > work > > with him on it over the weekend. > > > > An unusual request, from him. He must be desperate ;) > > > > Truth is, I have little feel for the subject - beyond having done > > adequately > > in a class 30 years ago in business school. Nor do I have a particular > > interest in the subject. > > > > But a father's duty calls... > > > > I am hoping to at least explore the possibility of subcontracting some > > this > > job to Python. I know there are many possibilities, and a number of > > modules > > available that could come into play. > > > > If anyone has any specific ideas, particularly where the goal is to use > > Python to assist in grasping the concepts of a typical introductory > > college > > Statistics class - their input would be appreciated. > > > > Art > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig From kent37 at tds.net Sat Nov 27 20:39:19 2004 From: kent37 at tds.net (Kent Johnson) Date: Sat Nov 27 20:39:23 2004 Subject: [Edu-sig] Python and statistics In-Reply-To: <0I7U00026IMJ2Z@mta10.srv.hcvlny.cv.net> References: <0I7U00026IMJ2Z@mta10.srv.hcvlny.cv.net> Message-ID: <41A8D7E7.7020904@tds.net> Arthur wrote: > I was also pointed to this resource: > > http://salstat.sunsite.dk/ > > which is one that is interesting also in light of recent discussion here - > in that the author's more direct interest is HCI, and this project's > motivation is connected to an effort to improve on what the author perceives > to be interface weaknesses in commercially designed Statistics packages. This statement on the salstat features page would give me pause if I were considering it for real work: "N.B. - none of the tests have been thoroughly tested for accuracy - any volunteers? ;)" Kent From urnerk at qwest.net Sun Nov 28 00:04:16 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Nov 28 00:04:16 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <41A4A465.1000801@wartburg.edu> Message-ID: <20041127230415.C79D41E4002@bag.python.org> I agree with John that it's often a good idea to get to graphics quickly. My approach has been to use the POV-Ray engine to consume scene description language generated from Python. The output is ray tracings. The latest 'Linux Journal' features POV-Ray on its cover I notice (just bought it at the supermarket -- the article is about visualizing atmospheric physics data; I should send a heads-up to my friend Rick, a professor in that area). I've used Python + POV-Ray to take data from sensors strapped to a ballerina, captured in Excel, and create corresponding stick figure animations (previous posts): http://www.4dsolutions.net/oscon2004/ In class, we used a similar to generate colorful polyhedra. If it's a short class, I'll supply some of the code. We'll learn by eyeballing it, dissecting it, and maybe writing some enhancements. Regarding statistics and other math-type applications for Python, I like using it conversationally, like one might use Mathematica. It's like a calculator, but calculators don't do list comprehensions. The motivation to save functions or classes comes from wanting to save retyping. For example, when doing stats, it's common to want a list of random numbers. It'd be useful to have a function with three parameters: min and max to specify the range for the random integers, and a howmany. >>> from random import randint >>> def getrand(min, max, howmany): return [randint(min,max) for i in range(howmany)] >>> mylist = getrand(0,100,10) >>> mylist [0, 58, 53, 47, 89, 61, 60, 87, 12, 18] Then we could do stuff like: >>> def mean(somelist): return sum(somelist)/float(len(somelist)) # or use truedivision >>> mean(mylist) 48.5 Then on to standard deviation, divergence, and so on. Very short programs. Lots of command line exploration. Then save the short programs in a module for reuse later. I take the same approach to teaching group theory: http://tinyurl.com/62eoc Kirby From palmer at execpc.com Sun Nov 28 01:38:21 2004 From: palmer at execpc.com (bill palmer) Date: Sun Nov 28 01:39:05 2004 Subject: [Edu-sig] Leo - python killer app? Message-ID: <41A91DFD.269CBB50@execpc.com> Just wondering if those on this list are familiar with the unique Leo outliner. I am just an avid user of it.... but I think it may be a instructional "killer app" for Python. :) The best features are probably not what are discussed when introducing it ... so you might have overlooked it. As a teaching tool I think it would be terrific. It is programmable with Python ...and is written in Python. You can use Leo's Execute Script to run any Python code ...even the current selection. It is unparalleled as an interactive experimental environment. You do not have to keep doing file save for each iteration...more like using a spreadsheet. The application window has three "panes": 1. One window with an outline of pages "headlines". 2. A log pane for system messages...and I set the default to capture Std-Out. 3. A body pane where the pages in the outline are edited. The information is stored in an XML file. The outline is able to write out the files within the XML outline to update or create the "real" external files. Its primary focus is as a programming IDE(for any language). I like to use the outline pages within Leo for program data sources and scripts together... so then there really are no external files...the data and the scripts are read and processed within the Leo outline itself. (For certain learning exercises this may be ideal.) It is Python and so completely cross-platform. Also it is a "Literate Programming" tool which may be of interest as a computer science demo on that basis as well. Teachers might like this even for non-programming purposes since the outline could contain everything for a particular lesson in any course. Each .leo outline is sort of like an electronic file cabinet. It even allows information to be replicated and appear in multiple places within the outline...called cloning(changes made to a clone are automatically done to other identical clones). The outline nodes can be just one fragment of a file(or script). If Leo ever became generally popular(as an organizer), then this would provide an inroad to Python acceptance at your school. Just open the .leo files that come with it to see examples. Forum link...... http://sourceforge.net/forum/forum.php?forum_id=10227 (select Files or Home in sourceForge to go to downloads) Highly, highly recommended! :) regards, bill p From urnerk at qwest.net Sun Nov 28 01:57:33 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Nov 28 01:57:34 2004 Subject: [Edu-sig] Leo - python killer app? In-Reply-To: <41A91DFD.269CBB50@execpc.com> Message-ID: <20041128005733.092571E4002@bag.python.org> > Just wondering if those on this list are familiar with the unique Leo > outliner. I am just an avid user of it.... but I think it may be a > instructional "killer app" for Python. :) Jason Cunliffe used to post in praise of Leo. I visited him in NYC once, and he talked a lot about Leo as we strolled around Brooklyn, plus he showed it to me in his apartment. We also went to some Chinese modern dance event which his girlfriend was involved with (a professor). We haven't been hearing from Jason for awhile. He used to contribute links to many far-flung corners of the Internet. Kirby From dajoy at openworldlearning.org Sun Nov 28 23:36:44 2004 From: dajoy at openworldlearning.org (Daniel Ajoy) Date: Sun Nov 28 23:37:01 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <20041128110003.66F4A1E400A@bag.python.org> Message-ID: <41AA0CAC.10662.2C346@localhost> I've always wanted to teach myself *inferential* statistics through programming, but most of the examples of statistics being taught through programming are *descriptive* statistics. Most of the simple programs that you see in old BASIC books that deal with statistics are, descriptive statistics. Most *inferential* statistics algorithms are overly technical or boring, and don't contribute to the understanding of inferential statistics. Eg, chi-square-distribution algorithm. I'm thinking that the problem arises because inferential statistics deal with population with an infinite number of members, or infinite many samples. Daniel On 28 Nov 2004 at 12:00, edu-sig-request@python.org wrote: > For example, when doing stats, it's common to want a list of random numbers. > It'd be useful to have a function with three parameters: min and max to > specify the range for the random integers, and a howmany. > > >>> from random import randint > >>> def getrand(min, max, howmany): > return [randint(min,max) for i in range(howmany)] > > >>> mylist = getrand(0,100,10) > >>> mylist > [0, 58, 53, 47, 89, 61, 60, 87, 12, 18] > > Then we could do stuff like: > > >>> def mean(somelist): > return sum(somelist)/float(len(somelist)) # or use truedivision > > >>> mean(mylist) > 48.5 > > Then on to standard deviation, divergence, and so on. Very short programs. > Lots of command line exploration. Then save the short programs in a module > for reuse later. > From urnerk at qwest.net Mon Nov 29 03:44:58 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Nov 29 03:44:56 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <41AA0CAC.10662.2C346@localhost> Message-ID: <20041129024455.BB8761E4003@bag.python.org> > I'm thinking that the problem arises because inferential > statistics deal with population with an infinite number of > members, or infinite many samples. > > Daniel > I'd think there'd be a way to fill this niche, even with Python. Surely there's a digital/discrete approach which mimics the idea of infinite data, if the discipline is at all real worldly -- because in practice, we never have infinite data. Kirby From ajsiegel at optonline.net Tue Nov 30 03:16:37 2004 From: ajsiegel at optonline.net (Arthur) Date: Tue Nov 30 03:16:45 2004 Subject: [Edu-sig] re: Leo - python killer app? Message-ID: <0I7Y00AYZZNVR3@mta7.srv.hcvlny.cv.net> Bill writes - >Just wondering if those on this list are familiar with the unique Leo >outliner. I am just an avid user of it.... but I think it may be a >instructional "killer app" for Python. :) Leo has gotten enough generally good press that your recommendation pushed me over the top, and I spent an hour or so with Leo. >The best features are probably not what are discussed when introducing >it ... so you might have overlooked it. As a teaching tool I think it >would be terrific. You are right, I think, that one can get a false impression of it's intent. I had understood its primary focus to be as a collaboration tool for larger development projects, and with a steep learning curve. And if the kind of folks involved with large development projects were to be warned of its learning curve, it was - I thought - not something I would want to undertake. Yet, it seemed manageable. And I can understand where your thinking is leading. DrScheme has a mechanism for loading lesson plans. I can see how *.leo files could be used to serve a similar purpose. Nicely. Perhaps very nicely. I like that it "makes do" with Tkinter. It plays to my sense of minimalism. I like keeping my python tree clean and simple. And it seems to suggest there is more to Tkinter than people tend to think. I *didn't* like that my source files ended up with Leo encodings/directives. So that my source - read outside of Leo - was less humanly readable after its encounter with Leo than it was before. Though I don't know what button I pushed to make this happen, what functionality it adds to Leo in working with the source, and to what extent it might be avoidable. Kirby is right that Jason had touted it before. "Killer app" I'll take a look at. I tend to shy away from "new paradigm"s. But in fairness to Jason I kidded him a bit about the "new paradigm" appellation he attached to Leo, and he admitted to perhaps some hyperbolic wording. I do think the idea of an executable textbook via Leo makes sense, though of course its all in the execution of the executable. Art From palmer at execpc.com Tue Nov 30 08:51:00 2004 From: palmer at execpc.com (bill palmer) Date: Tue Nov 30 08:51:45 2004 Subject: [Edu-sig] re: Leo - python killer app? References: <0I7Y00AYZZNVR3@mta7.srv.hcvlny.cv.net> Message-ID: <41AC2663.EFBEE58A@execpc.com> Art, Thanks for taking time to look at this. Here are a few responses to your observations. >>"source - read outside of Leo - was less humanly readable" The extra information(called sentinels) in the external files represents all of the outline structure as it resides in Leo. It allows the external file to be changed outside of Leo and then use "File...Read/Write...Read @file Nodes" command to update the copy inside the Leo outline. Actually I seldom look at this external source code because I am always in Leo. In your example, I suspect that what created the external file was the fact that you created an @file node. When you saved the .leo file, Leo also created the .py external file equal to the @file node. Using @nosent ...instead of @file... saves the external file without adding any Leo sentinels. regards, bill p Arthur wrote: > Bill writes - > > >Just wondering if those on this list are familiar with the unique Leo > >outliner. I am just an avid user of it.... but I think it may be a > >instructional "killer app" for Python. :) > > Leo has gotten enough generally good press that your recommendation pushed > me over the top, and I spent an hour or so with Leo. > > >The best features are probably not what are discussed when introducing > >it ... so you might have overlooked it. As a teaching tool I think it > >would be terrific. > > You are right, I think, that one can get a false impression of it's intent. > I had understood its primary focus to be as a collaboration tool for larger > development projects, and with a steep learning curve. And if the kind of > folks involved with large development projects were to be warned of its > learning curve, it was - I thought - not something I would want to > undertake. > > Yet, it seemed manageable. > > And I can understand where your thinking is leading. > > DrScheme has a mechanism for loading lesson plans. I can see how *.leo > files could be used to serve a similar purpose. Nicely. > > Perhaps very nicely. > > I like that it "makes do" with Tkinter. It plays to my sense of minimalism. > > I like keeping my python tree clean and simple. And it seems to suggest > there is more to Tkinter than people tend to think. > > I *didn't* like that my source files ended up with Leo encodings/directives. > So that my source - read outside of Leo - was less humanly readable after > its encounter with Leo than it was before. Though I don't know what button > I pushed to make this happen, what functionality it adds to Leo in working > with the source, and to what extent it might be avoidable. > > Kirby is right that Jason had touted it before. > > "Killer app" I'll take a look at. I tend to shy away from "new paradigm"s. > But in fairness to Jason I kidded him a bit about the "new paradigm" > appellation he attached to Leo, and he admitted to perhaps some hyperbolic > wording. > > I do think the idea of an executable textbook via Leo makes sense, though of > course its all in the execution of the executable. > > Art > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig From Ludger.Humbert at uni-dortmund.de Sun Nov 28 10:50:29 2004 From: Ludger.Humbert at uni-dortmund.de (Dr. Ludger Humbert) Date: Thu Dec 2 08:05:02 2004 Subject: [Edu-sig] ponto -- first public release Message-ID: <41A99F65.1020902@uni-dortmund.de> Dear python-edu-sig people, last week two of my students decided to put a nice piece of software under GPL, so you may take a closer look at it. What is Ponto? ============== ponto is a small piece of software to enable *informatics education* by building object oriented documents and using OpenOffice.org. ponto is released under GPL. At the moment two languages namely german and english are supported. ponto will start OpenOffice.org (writer) and communicates via pyuno-bridge. How to use Ponto? ================= example use (with OpenOffice.org bundled python) [Linux] /usr/local/OpenOffice.org1.1.2/program/python [Mac OS X] /Applications/OpenOffice1.1.2/program/python from ponto import Document birthdayInvitation=Document() opening=birthdayInvitation.createParagraph("Hi friend,") mainText=birthdayInvitation.createParagraph("as you know, ...") ... more information (incl. source-code) at http://www.ham.nw.schule.de/pub/bscw.cgi/0/73468 http://ddi.cs.uni-dortmund.de/projekte/ponto Ludger Humbert