Internet协议和支持¶
本章介绍的模块实现了Internet协议和对相关技术的支持。它们都是用Python实现的。这些模块大多需要系统相关模块的存在。 socket 这是目前最流行的平台所支持的。以下是概述:
webbrowser---方便的网络浏览器控制器cgi---通用网关接口支持cgitb---CGI脚本的回溯管理器wsgiref——wsgi实用程序和参考实现urllib---URL处理模块urllib.request---用于打开URL的可扩展库- 请求对象
- OpenerDirector对象
- BaseHandler对象
- httpRedirectHandler对象
- httpCookieProcessor对象
- proxyhandler对象
- httppasswordmgr对象
- httpPasswordMgrWithPriorAuth对象
- AbstractBasicAuthHandler对象
- httpbasicAuthHandler对象
- proxybasicauthhandler对象
- AbstractDigestAuthHandler对象
- httpDigestAuthHandler对象
- proxyDigeStauthHandler对象
- httphandler对象
- httpshandler对象
- 文件处理程序对象
- 数据处理程序对象
- ftphandler对象
- cacheftphandler对象
- 未知的handler对象
- httpErrorProcessor对象
- 实例
- 传统接口
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 objects according to RFC 4122socketserver——网络服务器框架http.server---HTTP服务器http.cookies——HTTP状态管理http.cookiejar---HTTP客户端的cookie处理xmlrpc---xmlrpc服务器和客户端模块xmlrpc.client---XML-RPC客户端访问xmlrpc.server---基本XML-RPC服务器ipaddress---IPv4/IPv6操作库