互联网协议和支持¶
本章介绍的模块实现了互联网协议以及相关技术支持。 它们都是用 Python 实现的。 这些模块大多需要依赖于系统的模块 socket
作为前提,该模块在大多数流行系统平台上都受到支持。 下面是一份概览:
webbrowser
--- Convenient web-browser controllerwsgiref
--- WSGI Utilities and Reference Implementationurllib
--- URL handling modulesurllib.request
--- Extensible library for opening URLs- Request 对象
- OpenerDirector 对象
- BaseHandler 对象
- HTTPRedirectHandler 对象
- HTTPCookieProcessor 对象
- ProxyHandler 对象
- HTTPPasswordMgr 对象
- HTTPPasswordMgrWithPriorAuth 对象
- AbstractBasicAuthHandler 对象
- HTTPBasicAuthHandler 对象
- ProxyBasicAuthHandler 对象
- AbstractDigestAuthHandler 对象
- HTTPDigestAuthHandler 对象
- ProxyDigestAuthHandler 对象
- HTTPHandler 对象
- HTTPSHandler 对象
- FileHandler 对象
- DataHandler 对象
- FTPHandler 对象
- CacheFTPHandler 对象
- UnknownHandler 对象
- HTTPErrorProcessor 对象
- 例子
- 已停用的接口
urllib.request
的限制
urllib.response
--- urllib 使用的 Response 类urllib.parse
--- Parse URLs into componentsurllib.error
--- Exception classes raised by urllib.requesturllib.robotparser
--- Parser for robots.txthttp
--- HTTP 模块http.client
--- HTTP protocol clientftplib
--- FTP protocol clientpoplib
--- POP3 protocol clientimaplib
--- IMAP4 protocol clientsmtplib
--- SMTP protocol clientuuid
--- UUID objects according to RFC 4122socketserver
--- A framework for network servershttp.server
--- HTTP servershttp.cookies
--- HTTP state managementhttp.cookiejar
--- Cookie handling for HTTP clientsxmlrpc
--- XMLRPC 服务端与客户端模块xmlrpc.client
--- XML-RPC client accessxmlrpc.server
--- Basic XML-RPC serversipaddress
--- IPv4/IPv6 manipulation library