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:
webbrowser
— 方便的 Web 浏览器控制器
cgi
— 通用网关接口支持
cgitb
— CGI 脚本的回溯管理器
wsgiref
— WSGI 实用程序和参考实现
urllib
— URL 处理模块
urllib.request
— 用于打开 URL 的可扩展库
urllib.request
限定
urllib.response
— 用于 urllib 的响应类
urllib.parse
— 把 URL 剖析成组件
urllib.error
— 由 urllib.request 引发的异常类
urllib.robotparser
— robots.txt 剖析器
http
— HTTP 模块
http.client
— HTTP 协议客户端
ftplib
— FTP 协议客户端
poplib
— POP3 协议客户端
imaplib
— IMAP4 协议客户端
nntplib
— NNTP 协议客户端
smtplib
— SMTP 协议客户端
smtpd
— SMTP 服务器
telnetlib
— Telnet 客户端
uuid
— UUID 对象根据
RFC 4122
socketserver
— 网络服务器框架
http.server
— HTTP 服务器
http.cookies
— HTTP 状态管理
http.cookiejar
— 用于 HTTP 客户端的 Cookie 处理
xmlrpc
— XMLRPC 服务器和客户端模块
xmlrpc.client
— XML-RPC 客户端访问
xmlrpc.server
— 基本 XML-RPC 服务器
ipaddress
— IPv4/IPv6 操纵库