BaseHTTPServer uses classes from SocketServer to create base
classes for making HTTP servers. HTTPServer can be used directly,
but the BaseHTTPRequestHandler is intended to be extended to
handle each protocol method (GET, POST, etc.).
The SocketServer module is a framework for creating network
servers. It provides base classes for handling TCP, UDP, Unix streams,
and Unix datagrams and supports both threading and forking servers,
depending on what is most appropriate for your situation.
The inspect module provides functions for learning about live
objects, including modules, classes, instances, functions, and
methods. You can use functions in this module to retrieve the
original source code for a function, look at the arguments to a method
on the stack, and extract the sort of information useful for producing
library documentation for your source code. My own CommandLineApp
module uses inspect to determine the valid options to a command
line program, as well as any arguments and their names so command line
programs are self-documenting and the help text is generated
For those of you subscribe directly to the PyMOTW feed, I apologize for
the temporary interruption in service. Apparently I reached a maximum
feed size and FeedBurner cut me off. I didn’t realize there was an
issue, because I had given up on the FeedBulletin notifications, since
they just cried wolf every day first by saying that there was a delay in
updating and then in the same email reporting that everything was
working again. In any event, the feed at
http://feeds.feedburner.com/PyMOTW is working correctly again, and
should start updating soon.
The functions provided are inspired by similar features of the “lazy
functional programming language” Haskell and SML. They are
intended to be fast and use memory efficiently, but also to be hooked
together to express more complicated iteration-based algorithms.