[Edu-sig] CP4E (states cgi demo)

Arthur ajsiegel at optonline.net
Mon Apr 11 13:41:50 CEST 2005

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

> -----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.
> 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 at python.org
> http://mail.python.org/mailman/listinfo/edu-sig

More information about the Edu-sig mailing list