O'Reilly logo

Python: Essential Reference, Third Edition by David Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BaseHTTPServer

The BaseHTTPServer module defines two base classes used to implement standalone HTTP servers. This module is used by a number of other modules, including SimpleHTTPServer, CGIHTTPServer, and SimpleXMLRPCServer.

						HTTPServer(server_address, request_handler)

Creates a new HTTPServer object. server_address is a tuple of the form (host, port) on which the server will listen. request_handler is a factory function that is used to create instances of BaseHTTPRequestHandler objects, described later. These handler objects are used to handle the details of each connection that is made to the server.

The HTTPServer class is derived from SocketServer.TCPServer and supports the same methods. In particular, the following functions are most relevant: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required