22. Internet Protocols and Support
**********************************

The modules described in this chapter implement Internet protocols and
support for related technology.  They are all implemented in Python.
Most of these modules require the presence of the system-dependent
module "socket", which is currently supported on most popular
platforms.  Here is an overview:

* 22.1. "webbrowser" — Convenient Web-browser controller

  * 22.1.1. Browser Controller Objects

* 22.2. "cgi" — Common Gateway Interface support

  * 22.2.1. Introduction

  * 22.2.2. Using the cgi module

  * 22.2.3. Higher Level Interface

  * 22.2.4. Functions

  * 22.2.5. Caring about security

  * 22.2.6. Installing your CGI script on a Unix system

  * 22.2.7. Testing your CGI script

  * 22.2.8. Debugging CGI scripts

  * 22.2.9. Common problems and solutions

* 22.3. "cgitb" — Traceback manager for CGI scripts

* 22.4. "wsgiref" — WSGI Utilities and Reference Implementation

  * 22.4.1. "wsgiref.util" – WSGI environment utilities

  * 22.4.2. "wsgiref.headers" – WSGI response header tools

  * 22.4.3. "wsgiref.simple_server" – a simple WSGI HTTP server

  * 22.4.4. "wsgiref.validate" — WSGI conformance checker

  * 22.4.5. "wsgiref.handlers" – server/gateway base classes

  * 22.4.6. Examples

* 22.5. "urllib" — URL handling modules

* 22.6. "urllib.request" — Extensible library for opening URLs

  * 22.6.1. Request Objects

  * 22.6.2. OpenerDirector Objects

  * 22.6.3. BaseHandler Objects

  * 22.6.4. HTTPRedirectHandler Objects

  * 22.6.5. HTTPCookieProcessor Objects

  * 22.6.6. ProxyHandler Objects

  * 22.6.7. HTTPPasswordMgr Objects

  * 22.6.8. HTTPPasswordMgrWithPriorAuth Objects

  * 22.6.9. AbstractBasicAuthHandler Objects

  * 22.6.10. HTTPBasicAuthHandler Objects

  * 22.6.11. ProxyBasicAuthHandler Objects

  * 22.6.12. AbstractDigestAuthHandler Objects

  * 22.6.13. HTTPDigestAuthHandler Objects

  * 22.6.14. ProxyDigestAuthHandler Objects

  * 22.6.15. HTTPHandler Objects

  * 22.6.16. HTTPSHandler Objects

  * 22.6.17. FileHandler Objects

  * 22.6.18. DataHandler Objects

  * 22.6.19. FTPHandler Objects

  * 22.6.20. CacheFTPHandler Objects

  * 22.6.21. UnknownHandler Objects

  * 22.6.22. HTTPErrorProcessor Objects

  * 22.6.23. Examples

  * 22.6.24. Legacy interface

  * 22.6.25. "urllib.request" Restrictions

* 22.7. "urllib.response" — Response classes used by urllib

* 22.8. "urllib.parse" — Parse URLs into components

  * 22.8.1. URL Parsing

  * 22.8.2. Parsing ASCII Encoded Bytes

  * 22.8.3. Structured Parse Results

  * 22.8.4. URL Quoting

* 22.9. "urllib.error" — Exception classes raised by urllib.request

* 22.10. "urllib.robotparser" —  Parser for robots.txt

* 22.11. "http" — HTTP modules

  * 22.11.1. HTTP status codes

* 22.12. "http.client" — HTTP protocol client

  * 22.12.1. HTTPConnection Objects

  * 22.12.2. HTTPResponse Objects

  * 22.12.3. Examples

  * 22.12.4. HTTPMessage Objects

* 22.13. "ftplib" — FTP protocol client

  * 22.13.1. FTP Objects

  * 22.13.2. FTP_TLS Objects

* 22.14. "poplib" — POP3 protocol client

  * 22.14.1. POP3 Objects

  * 22.14.2. POP3 Example

* 22.15. "imaplib" — IMAP4 protocol client

  * 22.15.1. IMAP4 Objects

  * 22.15.2. IMAP4 Example

* 22.16. "nntplib" — NNTP protocol client

  * 22.16.1. NNTP Objects

    * 22.16.1.1. Attributes

    * 22.16.1.2. Methods

  * 22.16.2. Utility functions

* 22.17. "smtplib" — SMTP protocol client

  * 22.17.1. SMTP Objects

  * 22.17.2. SMTP Example

* 22.18. "smtpd" — SMTP Server

  * 22.18.1. SMTPServer Objects

  * 22.18.2. DebuggingServer Objects

  * 22.18.3. PureProxy Objects

  * 22.18.4. MailmanProxy Objects

  * 22.18.5. SMTPChannel Objects

* 22.19. "telnetlib" — Telnet client

  * 22.19.1. Telnet Objects

  * 22.19.2. Telnet Example

* 22.20. "uuid" — UUID objects according to **RFC 4122**

  * 22.20.1. Example

* 22.21. "socketserver" — A framework for network servers

  * 22.21.1. Server Creation Notes

  * 22.21.2. Server Objects

  * 22.21.3. Request Handler Objects

  * 22.21.4. Examples

    * 22.21.4.1. "socketserver.TCPServer" Example

    * 22.21.4.2. "socketserver.UDPServer" Example

    * 22.21.4.3. Asynchronous Mixins

* 22.22. "http.server" — HTTP servers

* 22.23. "http.cookies" — HTTP state management

  * 22.23.1. Cookie Objects

  * 22.23.2. Morsel Objects

  * 22.23.3. Example

* 22.24. "http.cookiejar" — Cookie handling for HTTP clients

  * 22.24.1. CookieJar and FileCookieJar Objects

  * 22.24.2. FileCookieJar subclasses and co-operation with web
    browsers

  * 22.24.3. CookiePolicy Objects

  * 22.24.4. DefaultCookiePolicy Objects

  * 22.24.5. Cookie Objects

  * 22.24.6. Examples

* 22.25. "xmlrpc" — XMLRPC server and client modules

* 22.26. "xmlrpc.client" — XML-RPC client access

  * 22.26.1. ServerProxy Objects

  * 22.26.2. DateTime Objects

  * 22.26.3. Binary Objects

  * 22.26.4. Fault Objects

  * 22.26.5. ProtocolError Objects

  * 22.26.6. MultiCall Objects

  * 22.26.7. Convenience Functions

  * 22.26.8. Example of Client Usage

  * 22.26.9. Example of Client and Server Usage

* 22.27. "xmlrpc.server" — Basic XML-RPC servers

  * 22.27.1. SimpleXMLRPCServer Objects

    * 22.27.1.1. SimpleXMLRPCServer Example

  * 22.27.2. CGIXMLRPCRequestHandler

  * 22.27.3. Documenting XMLRPC server

  * 22.27.4. DocXMLRPCServer Objects

  * 22.27.5. DocCGIXMLRPCRequestHandler

* 22.28. "ipaddress" — IPv4/IPv6 manipulation library

  * 22.28.1. Convenience factory functions

  * 22.28.2. IP Addresses

    * 22.28.2.1. Address objects

    * 22.28.2.2. Conversion to Strings and Integers

    * 22.28.2.3. Operators

      * 22.28.2.3.1. Comparison operators

      * 22.28.2.3.2. Arithmetic operators

  * 22.28.3. IP Network definitions

    * 22.28.3.1. Prefix, net mask and host mask

    * 22.28.3.2. Network objects

    * 22.28.3.3. Operators

      * 22.28.3.3.1. Logical operators

      * 22.28.3.3.2. Iteration

      * 22.28.3.3.3. Networks as containers of addresses

  * 22.28.4. Interface objects

    * 22.28.4.1. Operators

      * 22.28.4.1.1. Logical operators

  * 22.28.5. Other Module Level Functions

  * 22.28.6. Custom Exceptions
