The CGIHTTPServer module

This is a simple HTTP server that can call external scripts through the common gateway interface (CGI).

Example: Using the CGIHTTPServer module
# File: cgihttpserver-example-1.py

import CGIHTTPServer
import BaseHTTPServer

class Handler(CGIHTTPServer.CGIHTTPRequestHandler):
    cgi_directories = ["/cgi"]

PORT = 8000

httpd = BaseHTTPServer.HTTPServer(("", PORT), Handler)
print "serving at port", PORT
httpd.serve_forever()
 

[comment on/vote for this article]

A Django site. this page was rendered by a django application in 0.00s 2012-02-04 07:15:21.577164. hosted by webfaction.