Table 19.7. Web Programming Related Modules
Module
|
Description
|
Parsing
|
htmllib
|
parses simple HTML files
|
sgmllib
|
parses simple SGML files
|
xmllib
|
parses simple XML files
|
robotparser[a]
|
parses robots.txt files for URL "fetchability" analysis
|
Mail Client Protocols
|
poplib
|
use to create POP3 clients
|
imaplib
|
use to create IMAP4 clients
|
Mail and MIME Processing and Data Encoding Formats
|
mailcap
|
parses mailcap files to obtain MIME application delegations
|
mimetools
|
provides functions for manipulating MIM-encoded messages
|
mimetypes
|
provides MIME type associations
|
MimeWriter
|
generates MIME-encoded multipart files
|
multifile
|
can parse multipart MIME-encoded files
|
quopri
|
en-/decodes data using quoted-printable encoding
|
rfc822
|
parses RFC822-compliant e-mail headers
|
smtplib
|
uses to create SMTP (Simple Mail Transfer Protocol) clients
|
base64
|
en-/decodes data using base64 encoding
|
binascii
|
en-/decodes data using base64, binhex, or uu (modules)
|
binhex
|
en-/decodes data using binhex4 encoding
|
uu
|
en-/decodes data using uuencode encoding
|
Internet Protocols
|
httplib[a]
|
use to create HTTP (HyperText Transfer Protocol) clients (modified in Python 1.6 to support HTTP 1.1 and SSL)
|
ftplib
|
use to create FTP (File Transfer Protocol) clients
|
gopherlib
|
use to create Gopher clients
|
telnetlib
|
use to create Telnet clients
|
nntplib
|
use to create NNTP (Network News Transfer Protocol [Usenet]) clients
|
External/Commercial
|
HTMLgen
|
use with CGI to generate complex HTML documents
|
Zope
(not a module)
|
web object publishing product and Python Web application development environment (http://www.zope.org)
|
Zope is an open source Web publishing and application development platform which has Python code everywhere. Part of it is written in Python, and Python can be used to create extensions to Zope. Although it is in our Related Modules section, Zope is not a specific module as it is a powerful system for Web publishing.
Zope presents an extremely powerful alternative when simple CGI and database access just do not cut it for the application you are trying to build. Material on Zope itself can take up a book's length—you may even see one soon! We invite the reader to explore this system if desiring to create any complex system.