Writing code to work with files on multiple platforms is easy using
the functions included in the os.path module. Even programs not
intended to be ported between platforms should use os.path to make
parsing path names reliable.
The hashlib module deprecates the separate md5 and sha
modules and makes their API consistent. To work with a specific hash
algorithm, use the appropriate constructor function to create a hash
object. Then you can use the same API to interact with the hash no
matter what algorithm is being used.
Use the mmap() function to create a memory-mapped file. There are
differences in the arguments and behaviors for mmap() between Unix
and Windows, which are not discussed below. For more details, refer to
the library documentation.
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.).