< BACKMake Note | BookmarkCONTINUE >
156135250194107072078175030179198180025031194137176049106218111004226053241019178080129118

Related Modules

In Table 19-7, we present a list of modules which you may find useful for Web and Internet development.

  • The parsing modules deal with recognizing documents in specific formats.

  • You can write POP- or IMAP-compliant mail clients using the corresponding protocol modules.

  • Python has plenty of modules to support most kinds of binary file encoding for e-mail and other MIME-oriented applications.

  • You can create clients for common Internet protocols like HTTP, FTP, Telnet, and NNTP with the appropriate modules. Be aware that urllib provides a high-level interface to protocols supported by your browser such as HTTP and FTP, so use of the lower-level protocol modules only makes sense when you cannot get all you want from urllib.

  • Finally, we have the HTMLgen external module and the commercial Zope (Z Object Publishing Environment) system by Digital Creations. We introduced the HTMLgen module briefly at the end of Section 19.5. It definitely comes in handy when you need to generate more complex HTML documents via CGI scripts.

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)

[a] new or modified in Python 1.6

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.

The robotparser module is new as of Python 1.6 and the httplib and urllib modules have been modified for 1.6 to support HTTP connections over SSL. (See Section 19.2.2 for a really brief introduction.) Also, a new module webbrowser, was introduced in 2.0 to provide a platform-independent way to launch a Web browser.


Last updated on 9/14/2001
Core Python Programming, © 2002 Prentice Hall PTR

< BACKMake Note | BookmarkCONTINUE >

© 2002, O'Reilly & Associates, Inc.