21. 互联网协议和支持¶
本章介绍的模块实现了互联网协议并支持相关技术。 它们都是用 Python 实现的。 这些模块中的大多数都需要存在依赖于系统的模块 socket
,目前大多数流行平台都支持它。 这是一个概述:
- 21.1.
webbrowser
— 方便的Web浏览器控制器 - 21.2.
cgi
— Common Gateway Interface support - 21.3.
cgitb
— Traceback manager for CGI scripts - 21.4.
wsgiref
— WSGI Utilities and Reference Implementation - 21.5.
urllib
— URL 处理模块 - 21.6.
urllib.request
— 用于打开 URL 的可扩展库- 21.6.1. Request Objects
- 21.6.2. OpenerDirector Objects
- 21.6.3. BaseHandler Objects
- 21.6.4. HTTPRedirectHandler Objects
- 21.6.5. HTTPCookieProcessor Objects
- 21.6.6. ProxyHandler Objects
- 21.6.7. HTTPPasswordMgr Objects
- 21.6.8. HTTPPasswordMgrWithPriorAuth Objects
- 21.6.9. AbstractBasicAuthHandler Objects
- 21.6.10. HTTPBasicAuthHandler Objects
- 21.6.11. ProxyBasicAuthHandler Objects
- 21.6.12. AbstractDigestAuthHandler Objects
- 21.6.13. HTTPDigestAuthHandler Objects
- 21.6.14. ProxyDigestAuthHandler Objects
- 21.6.15. HTTPHandler Objects
- 21.6.16. HTTPSHandler Objects
- 21.6.17. FileHandler Objects
- 21.6.18. DataHandler Objects
- 21.6.19. FTPHandler Objects
- 21.6.20. CacheFTPHandler Objects
- 21.6.21. UnknownHandler Objects
- 21.6.22. HTTPErrorProcessor Objects
- 21.6.23. 示例
- 21.6.24. Legacy interface
- 21.6.25.
urllib.request
Restrictions
- 21.7.
urllib.response
— Response classes used by urllib - 21.8.
urllib.parse
— Parse URLs into components - 21.9.
urllib.error
— Exception classes raised by urllib.request - 21.10.
urllib.robotparser
— Parser for robots.txt - 21.11.
http
— HTTP 模块 - 21.12. http.client — HTTP协议客户端
- 21.13.
ftplib
— FTP protocol client - 21.14.
poplib
— POP3 protocol client - 21.15.
imaplib
— IMAP4 protocol client - 21.16.
nntplib
— NNTP protocol client - 21.17.
smtplib
—SMTP协议客户端 - 21.18.
smtpd
— SMTP Server - 21.19.
telnetlib
— Telnet client - 21.20.
uuid
— UUID objects according to RFC 4122 - 21.21.
socketserver
— A framework for network servers - 21.22.
http.server
— HTTP 服务器 - 21.23.
http.cookies
— HTTP state management - 21.24.
http.cookiejar
— Cookie handling for HTTP clients - 21.25.
xmlrpc
— XMLRPC 服务端与客户端模块 - 21.26.
xmlrpc.client
— XML-RPC client access - 21.27.
xmlrpc.server
— Basic XML-RPC servers - 21.28.
ipaddress
— IPv4/IPv6 manipulation library