[Tutor] question about cgi and, guess what, Python

Wesley J. Chun wesc@alpha.ece.ucsb.edu
Thu, 20 Jul 2000 00:30:17 -0700 (PDT)


    > From: Daniel Yoo <dyoo@hkn.eecs.berkeley.edu>
    > Date: Wed, 19 Jul 2000 23:30:32 -0700 (PDT)
    > 
    > On Wed, 19 Jul 2000, Steven Gilmore wrote:
    > 
    > > I need a server for Windows strictly for
    > > testing purposes.  Does anybody know of a
    > > free, open source  or just free server?
    > 
    > Try Apache; it's free, it's fast, and it's stable.  *grin* 

as well as the web server that runs most of the web sites out there!

but wait... shouldn't we be eating our own dog food?

use the HTTPServer class in the BaseHTTPServer module to create
the basic web server.  then use one of the following handler
classes to make your server do what you want it to:

SimpleHTTPServer.SimpleHTTPRequestHandler	(does GET, HEAD)
CGIHTTPServer.CGIHTTPRequestHandler		(does CGI)
BaseHTTPServer.BaseHTTPRequestHandler		(does nothing)

Beazley has some examples in Python Essential Reference.

hope this helps!!

-wesley

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

"Core Python Programming", Prentice Hall PTR, TBP Summer 2000
    http://www.phptr.com/ptrbooks/ptr_0130260363.html
    http://www.softpro.com/languages-python.html

wesley.j.chun :: wesc@alpha.ece.ucsb.edu
cyberweb.consulting :: silicon.valley, ca
http://www.roadkill.com/~wesc/cyberweb/