[Tutor] HTTP GET Request

Mike Hansen mhansen at cso.atmel.com
Tue Sep 27 21:33:05 CEST 2005


> Subject:
> Re: [Tutor] HTTP GET Request
> From:
> paul brian <paul1brian at gmail.com>
> Date:
> Tue, 27 Sep 2005 17:04:46 +0100
> To:
> Jerl Simpson <jerl.simpso at gmail.com>
> 
> To:
> Jerl Simpson <jerl.simpso at gmail.com>
> CC:
> tutor at python.org
> 
> 
>>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.
> 
> 
> instead of which program ?
> 
> Http requests are served by a web server (ie Apache), which depending
> on the type of request passes the request to wherever.
> 
> As such any HTTP request *must* be handled first by a web server, and
> cgi scripts traditionally lived in cgi-bin directory on the server so
> a URL would look like http://www.example.com/cgi-bin/myscript.py
> 
> I think you have 3 options
> 
> 1. use the cgi module in python to create scripts like the one above.
>     They will not be fast but it gives you a lowlevel access to the request
>     However cgi was out of date about 8 years ago - it has some
> serious    limitations mostly on speed/capacity.
> 

 From what others have told me, I wouldn't say that cgi is out of date. The 
couple of apps I've done perform just fine. Also, I'd recommend that every 
programmer do at least a little app using cgi to get a good understanding of the 
basics before jumping into alternative methods like mod_python or one of the 
million python web frameworks where things get more complex.

Mike


More information about the Tutor mailing list