[Tutor] question about cgi and, guess what, Python
Wesley J. Chun
Thu, 20 Jul 2000 00:30:17 -0700 (PDT)
> From: Daniel Yoo <email@example.com>
> 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!!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall PTR, TBP Summer 2000
wesley.j.chun :: firstname.lastname@example.org
cyberweb.consulting :: silicon.valley, ca