[Tutor] HTTP GET Request

Kent Johnson kent37 at tds.net
Tue Sep 27 18:33:29 CEST 2005

Jerl Simpson wrote:
> Hello,
> I have been looking through some of the HTTP projects and haven't quite 
> found what I'm looking for.
> Basicall, what I need is a stand alone CGI.  Instead of the program 
> passing the data off to a CGI, I want it to parse and handle the request 
> directly.
> The part I'm having trouble with is actually getting the request and 
> parsing it.

It sounds like you need to set up a web server. It also sounds like maybe you don't know that you need to set up a web server? You might want to take a look at CherryPy which is pretty easy to get started with. The third tutorial program shows how to get query parameters from the URL.


> Let's say I have a URI that looks like:  ?var1=val1&var2=val2&...varn=valn
> I'd like to find a way to get these into some datastructure so I can use 
> them to generate my output.
> It seems like a simple thing, but as I'm new to python, I don't know 
> where to start.
> Thank you for any help you can give.
> Jerl
> ------------------------------------------------------------------------
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list