[Edu-sig] CP4E (states cgi demo)
ajsiegel at optonline.net
Mon Apr 11 13:41:50 CEST 2005
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
> -----Original Message-----
> From: edu-sig-bounces at python.org [mailto:edu-sig-bounces at python.org] On
> Behalf Of Kirby Urner
> Sent: Sunday, April 10, 2005 11:45 PM
> To: edu-sig at 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.
> are viewable versions (extension changed from cgi to txt for the first
> The executable cgi scripts are testable here:
> There's nothing fancy or special going on here. Definitely Python 101
> (basic basic). But I could see incorporating this material into a
> class. Again: the server is someplace else (location, URL address) and
> 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.
> only need to recognize the capital, not call it up from scratch. The
> of these capitals is random (changes with every visit), not alphabetical
> 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
> 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
> 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:
> -p -e 's/\r$//' < winfile.txt > unixfile.txt
> Edu-sig mailing list
> Edu-sig at python.org
More information about the Edu-sig