20. 互联网协议和支持¶
本章介绍的模块实现了互联网协议并支持相关技术。 它们都是用 Python 实现的。 这些模块中的大多数都需要存在依赖于系统的模块 socket
,目前大多数流行平台都支持它。 这是一个概述:
- 20.1.
webbrowser
— 方便的Web浏览器控制器 - 20.2.
cgi
— Common Gateway Interface support - 20.3.
cgitb
— 用于 CGI 脚本的回溯管理器 - 20.4.
wsgiref
— WSGI Utilities and Reference Implementation - 20.5.
urllib
— Open arbitrary resources by URL - 20.6.
urllib2
— extensible library for opening URLs- 20.6.1. Request Objects
- 20.6.2. OpenerDirector Objects
- 20.6.3. BaseHandler Objects
- 20.6.4. HTTPRedirectHandler Objects
- 20.6.5. HTTPCookieProcessor Objects
- 20.6.6. ProxyHandler Objects
- 20.6.7. HTTPPasswordMgr Objects
- 20.6.8. AbstractBasicAuthHandler Objects
- 20.6.9. HTTPBasicAuthHandler Objects
- 20.6.10. ProxyBasicAuthHandler Objects
- 20.6.11. AbstractDigestAuthHandler Objects
- 20.6.12. HTTPDigestAuthHandler Objects
- 20.6.13. ProxyDigestAuthHandler Objects
- 20.6.14. HTTPHandler Objects
- 20.6.15. HTTPSHandler Objects
- 20.6.16. FileHandler Objects
- 20.6.17. FTPHandler Objects
- 20.6.18. CacheFTPHandler Objects
- 20.6.19. UnknownHandler Objects
- 20.6.20. HTTPErrorProcessor Objects
- 20.6.21. Examples
- 20.7.
httplib
— HTTP protocol client - 20.8.
ftplib
— FTP 协议客户端 - 20.9.
poplib
— POP3 protocol client - 20.10.
imaplib
— IMAP4 protocol client - 20.11.
nntplib
— NNTP protocol client - 20.12.
smtplib
—SMTP协议客户端 - 20.13.
smtpd
— SMTP 服务器 - 20.14.
telnetlib
— Telnet client - 20.15.
uuid
— UUID objects according to RFC 4122 - 20.16.
urlparse
— Parse URLs into components - 20.17.
SocketServer
— A framework for network servers - 20.18.
BaseHTTPServer
— Basic HTTP server - 20.19.
SimpleHTTPServer
— Simple HTTP request handler - 20.20.
CGIHTTPServer
— CGI-capable HTTP request handler - 20.21.
cookielib
— Cookie handling for HTTP clients - 20.22.
Cookie
— HTTP state management - 20.23.
xmlrpclib
— XML-RPC client access - 20.24.
SimpleXMLRPCServer
— Basic XML-RPC server - 20.25.
DocXMLRPCServer
— Self-documenting XML-RPC server