Mega Code Archive

 
Categories / Python Tutorial / Network
 

Creating an HTTP Server to Process CGI Scripts

import os import BaseHTTPServer, CGIHTTPServer serverAddr = ("", 80) os.chdir("/myTest") serv = BaseHTTPServer.HTTPServer(serverAddr, CGIHTTPServer.CGIHTTPRequestHandler) serv.serve_forever()