1 2 3 4 5 6
from BaseHTTPServer import HTTPServer import handler def make(port): server_address = ('127.0.0.1', port) return HTTPServer(server_address, handler.TestRequestHandler)