[KLUG Members] Re: Dynamic HTML/HTTP question

John Holland members@kalamazoolinux.org
Thu, 5 Dec 2002 11:27:24 -0500


On Thu, Dec 05, 2002 at 10:42:20AM -0500, Robert G. Brown wrote:
 >One solution is python:
> >
> >>>> import urllib
> >>>> params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
> >>>> f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query", params)
> >>>> print f.read()
> This is about the right level of abstraction. I don't know much python;
> that can change quickly. 
> 
> Does this handle the difference bewteen GET vs. POST ?
> In general, I would expect a GET should look like...
> http://www.musi-cal.com/cgi-bin/query?spam=1&eggs=2&bacon=0

Exactly.

If you decide to use python, I'd be happy to help.  I'm a fan, can't you
tell.


--------------------------------------------------------------------
John Holland 
john@zoner.org
http://www.zoner.org