Kirby - A great microcosm of where things stand, IMO.
It's simply amazing how well what we are capable of technically maps to how things *should* be taught. Is there an Unseen Hand arranging the universe in this user friendly fashion. Art > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Kirby Urner > Sent: Sunday, April 10, 2005 11:45 PM > To: edu-sig@python.org > Subject: RE: [Edu-sig] CP4E (states cgi demo) > > > So I uploaded a tiny demo showing how I might quiz myself about state > capitals using a simple cgi script. > > http://www.4dsolutions.net/ocn/python/form1.txt > http://www.4dsolutions.net/ocn/python/checkanswer.txt > http://www.4dsolutions.net/ocn/python/statecapitals.txt > > are viewable versions (extension changed from cgi to txt for the first > two). > > > The executable cgi scripts are testable here: > http://www.4dsolutions.net/cgi-bin/form1.cgi > > There's nothing fancy or special going on here. Definitely Python 101 > (basic basic). But I could see incorporating this material into a > Geography > class. Again: the server is someplace else (location, URL address) and > the > infrastructure used to interact with it is global (Internet). That's > relevant to geography! > > Note that having all the capitals in a drop down makes the task easier. > You > only need to recognize the capital, not call it up from scratch. The > order > of these capitals is random (changes with every visit), not alphabetical > as > one might expect from previous experience with such drop-downs. > > As Anna pointed out, this same skeletal approach could fit multiple data > sets, i.e. we could reuse the code to test ourselves on any list of > key-value pairs. > > I did have some big fights to get this far (typical struggles): > > (1) obscure bug on first release of Python 2.4 kept cgi values from > passing > to a child process. Fixed by installing 2.4.1. This was a bug in the > Windows version only. > > (2) because I'm playing around on a WinXP laptop and using PSFTP to copy > files up to my ISP, I got bitten by the line-ending problem, i.e. Apache > at > the ISP dies if the line endings are \r\n instead of \n (locally, > CGIHTTPServer didn't care). I fixed this by running Perl stuff like: > perl > -p -e 's/\r$//' < winfile.txt > unixfile.txt > > Kirby > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig