Python 文档目录¶
- Python的新变化- Python 3.6 有什么新变化A- 摘要 - 发布重点
- 新的特性- PEP 498: 格式化的字符串文字
- PEP 526: 变量注释的语法
- PEP 515: 数字文字中的下划线。
- PEP 525: 异步生成器
- PEP 530: 异步推导
- PEP 487: 自定义类创建
- PEP 487: 描述器协议的增强
- PEP 519: 添加文件系统路径协议
- PEP 495: 消除本地时间的歧义
- PEP 529: 将Windows文件系统编码更改为UTF-8
- PEP 528: 将Windows控制台编码更改为UTF-8
- PEP 520: 保留类属性定义顺序
- PEP 468: 保留关键字参数顺序
- 新的 dict 实现
- PEP 523: 向CPython 添加框架评估API
- PYTHONMALLOC 环境变量
- DTrace 和 SystemTap 探测支持
 
- 其他语言特性修改
- 新增模块
- 改进的模块- array
- ast
- asyncio
- binascii
- cmath
- collections
- concurrent.futures
- contextlib
- datetime
- decimal
- distutils
- encodings
- enum
- faulthandler
- fileinput
- hashlib
- http.client
- idlelib 与 IDLE
- importlib
- inspect
- json
- logging
- math
- multiprocessing
- os
- pathlib
- pdb
- pickle
- pickletools
- pydoc
- random
- re
- readline
- rlcompleter
- shlex
- site
- sqlite3
- socket
- socketserver
- ssl
- statistics
- struct
- subprocess
- sys
- telnetlib
- time
- timeit
- tkinter
- 回溯
- tracemalloc
- typing
- unicodedata
- unittest.mock
- urllib.request
- urllib.robotparser
- venv
- warnings
- winreg
- winsound
- xmlrpc.client
- zipfile
- zlib
 
- 性能优化
- 构建和 C API 的改变
- 其他改进
- 弃用
- 移除
- 移植到Python 3.6
- Python 3.6.2 中的重要变化
- Python 3.6.4 中的重要变化
- Python 3.6.5 中的重要变化
- Python 3.6.7 中的重要变化
- Python 3.6.10 中的重要变化
- Notable changes in Python 3.6.13
- Notable changes in Python 3.6.14
 
- Python 3.5 有什么新变化- 摘要 - 发布重点
- 新的特性- PEP 492 - 使用 async 和 await 语法实现协程
- PEP 465 - 用于矩阵乘法的专用中缀运算符
- PEP 448 - Additional Unpacking Generalizations
- PEP 461 - percent formatting support for bytes and bytearray
- PEP 484 - 类型提示
- PEP 471 - os.scandir() function – a better and faster directory iterator
- PEP 475: Retry system calls failing with EINTR
- PEP 479: Change StopIteration handling inside generators
- PEP 485: A function for testing approximate equality
- PEP 486: Make the Python Launcher aware of virtual environments
- PEP 488: Elimination of PYO files
- PEP 489: Multi-phase extension module initialization
 
- 其他语言特性修改
- 新增模块
- 改进的模块- argparse
- asyncio
- bz2
- cgi
- cmath
- code
- collections
- collections.abc
- compileall
- concurrent.futures
- configparser
- contextlib
- csv
- curses
- dbm
- difflib
- distutils
- doctest
- enum
- faulthandler
- functools
- glob
- gzip
- heapq
- http
- http.client
- idlelib 与 IDLE
- imaplib
- imghdr
- importlib
- inspect
- io
- ipaddress
- json
- linecache
- locale
- logging
- lzma
- math
- multiprocessing
- operator
- os
- pathlib
- pickle
- poplib
- re
- readline
- selectors
- shutil
- signal
- smtpd
- smtplib
- sndhdr
- socket
- ssl
- sqlite3
- subprocess
- sys
- sysconfig
- tarfile
- threading
- time
- timeit
- tkinter
- 回溯
- types
- unicodedata
- unittest
- unittest.mock
- urllib
- wsgiref
- xmlrpc
- xml.sax
- zipfile
 
- 其他模块级更改
- 性能优化
- 构建和 C API 的改变
- 弃用
- 移除
- 移植到Python 3.5
- Python 3.5.4 的显著变化
 
- Python 3.4 有什么新变化- 摘要 - 发布重点
- 新的特性
- 新增模块
- 改进的模块- abc
- aifc
- argparse
- audioop
- base64
- collections
- colorsys
- contextlib
- dbm
- dis
- doctest
- filecmp
- functools
- gc
- glob
- hashlib
- hmac
- html
- http
- idlelib 与 IDLE
- importlib
- inspect
- ipaddress
- logging
- marshal
- mmap
- multiprocessing
- operator
- os
- pdb
- pickle
- plistlib
- poplib
- pprint
- pty
- pydoc
- re
- resource
- select
- shelve
- shutil
- smtpd
- smtplib
- socket
- sqlite3
- ssl
- stat
- struct
- subprocess
- sunau
- sys
- tarfile
- textwrap
- threading
- 回溯
- types
- urllib
- unittest
- venv
- wave
- weakref
- xml.etree
- zipfile
 
- CPython Implementation Changes
- 弃用
- 移除
- 移植到 Python 3.4
- 3.4.3 的变化
 
- Python 3.3 有什么新变化- 摘要 - 发布重点
- PEP 405: 虚拟环境
- PEP 420: 隐式命名空间包
- PEP 3118: 新的内存视图实现和缓冲协议文档
- PEP 393: 灵活的字符串表示
- PEP 397: 适用于Windows的Python启动器
- PEP 3151: 重写 OS 和 IO 异常的层次结构
- PEP 380: 委托给子生成器的语法
- PEP 409: 清除异常上下文
- PEP 414: 显式的Unicode文本
- PEP 3155: 类和函数的限定名称
- PEP 412: Key-Sharing Dictionary
- PEP 362: 函数签名对象
- PEP 421: 添加 sys.implementation
- Using importlib as the Implementation of Import
- 其他语言特性修改
- A Finer-Grained Import Lock
- Builtin functions and types
- 新增模块
- 改进的模块- abc
- array
- base64
- binascii
- bz2
- 编码器
- collections
- contextlib
- crypt
- curses
- datetime
- decimal
- ftplib
- functools
- gc
- hmac
- http
- html
- imaplib
- inspect
- io
- itertools
- logging
- math
- mmap
- multiprocessing
- nntplib
- os
- pdb
- pickle
- pydoc
- re
- sched
- select
- shlex
- shutil
- signal
- smtpd
- smtplib
- socket
- socketserver
- sqlite3
- ssl
- stat
- struct
- subprocess
- sys
- tarfile
- tempfile
- textwrap
- threading
- time
- types
- unittest
- urllib
- webbrowser
- xml.etree.ElementTree
- zlib
 
- 性能优化
- 构建和 C API 的改变
- 弃用
- 移植到 Python 3.3
 
- Python 3.2 有什么新变化- PEP 384: 定义稳定的ABI
- PEP 389: Argparse 命令行解析模块
- PEP 391: 基于字典的日志配置
- PEP 3148:  concurrent.futures模块
- PEP 3147: PYC 仓库目录
- PEP 3149: ABI Version Tagged .so Files
- PEP 3333: Python Web服务器网关接口v1.0.1
- 其他语言特性修改
- 新增,改进和弃用的模块- elementtree
- functools
- itertools
- collections
- threading
- datetime 和 time
- math
- abc
- io
- reprlib
- logging
- csv
- contextlib
- decimal and fractions
- ftp
- popen
- select
- gzip 和 zipfile
- tarfile
- hashlib
- ast
- os
- shutil
- sqlite3
- html
- socket
- ssl
- nntp
- certificates
- imaplib
- http.client
- unittest
- random
- poplib
- asyncore
- tempfile
- inspect
- pydoc
- dis
- dbm
- ctypes
- site
- sysconfig
- pdb
- configparser
- urllib.parse
- mailbox
- turtledemo
 
- 多线程
- 性能优化
- Unicode
- 编解码器
- 文档
- IDLE
- 代码库
- 构建和 C API 的改变
- 移植到 Python 3.2
 
- Python 3.1 有什么新变化
- Python 3.0 有什么新变化
- Python 2.7 有什么新变化- Python 2.x的未来
- Changes to the Handling of Deprecation Warnings
- Python 3.1 Features
- PEP 372: Adding an Ordered Dictionary to collections
- PEP 378: 千位分隔符的格式说明符
- PEP 389: The argparse Module for Parsing Command Lines
- PEP 391: Dictionary-Based Configuration For Logging
- PEP 3106: Dictionary Views
- PEP 3137: The memoryview Object
- 其他语言特性修改
- 新增和改进的模块
- 构建和 C API 的改变
- Other Changes and Fixes
- 移植到 Python 2.7
- New Features Added to Python 2.7 Maintenance Releases- Two new environment variables for debug mode
- PEP 434: IDLE Enhancement Exception for All Branches
- PEP 466: Network Security Enhancements for Python 2.7
- PEP 477: Backport ensurepip (PEP 453) to Python 2.7
- PEP 476: Enabling certificate verification by default for stdlib http clients
- PEP 493:适用于Python 2.7 的HTTPS验证迁移工具
- New make regen-allbuild target
- Removal of make touchbuild target
 
- 致谢
 
- Python 2.6 有什么新变化- Python 3.0
- 开发过程的变化
- PEP 343: “with” 语句
- PEP 366: 从主模块显式相对导入
- PEP 370: 分用户的 site-packages 目录
- PEP 371: 多任务处理包
- PEP 3101: 高级字符串格式
- PEP 3105: print改为函数
- PEP 3110: 异常处理的变更
- PEP 3112: 字节字面值
- PEP 3116: 新 I/O 库
- PEP 3118: 修改缓冲区协议
- PEP 3119: 抽象基类
- PEP 3127: 整型文字支持和语法
- PEP 3129: 类装饰器
- PEP 3141: A Type Hierarchy for Numbers
- 其他语言特性修改
- 新增和改进的模块
- Deprecations and Removals
- 构建和 C API 的改变
- 移植到Python 2.6
- 致谢
 
- Python 2.5 有什么新变化
- Python 2.4 有什么新变化- PEP 218: 内置集合对象
- PEP 237: 统一长整数和整数
- PEP 289: 生成器表达式
- PEP 292: Simpler String Substitutions
- PEP 318: Decorators for Functions and Methods
- PEP 322: 反向迭代
- PEP 324: 新的子进程模块
- PEP 327: 十进数据类型
- PEP 328: 多行导入
- PEP 331: Locale-Independent Float/String Conversions
- 其他语言特性修改
- 新增,改进和弃用的模块
- 构建和 C API 的改变
- 移植到 Python 2.4
- 致谢
 
- Python 2.3 有什么新变化- PEP 218: A Standard Set Datatype
- PEP 255: Simple Generators
- PEP 263: Source Code Encodings
- PEP 273: 从ZIP压缩包导入模块
- PEP 277: Unicode file name support for Windows NT
- PEP 278: 通用换行支持
- PEP 279: enumerate()
- PEP 282: logging 包
- PEP 285: 布尔类型
- PEP 293: Codec Error Handling Callbacks
- PEP 301: Distutils的软件包索引和元数据
- PEP 302: New Import Hooks
- PEP 305: 逗号分隔文件
- PEP 307: Pickle Enhancements
- 扩展切片
- 其他语言特性修改
- 新增,改进和弃用的模块
- Pymalloc: A Specialized Object Allocator
- 构建和 C API 的改变
- Other Changes and Fixes
- 移植到 Python 2.3
- 致谢
 
- Python 2.2 有什么新变化
- Python 2.1 有什么新变化- 概述
- PEP 227: Nested Scopes
- PEP 236: __future__ Directives
- PEP 207: Rich Comparisons
- PEP 230: Warning Framework
- PEP 229: New Build System
- PEP 205: Weak References
- PEP 232: Function Attributes
- PEP 235: Importing Modules on Case-Insensitive Platforms
- PEP 217: Interactive Display Hook
- PEP 208: New Coercion Model
- PEP 241: Metadata in Python Packages
- 新增和改进的模块
- Other Changes and Fixes
- 致谢
 
- Python 2.0 有什么新变化
- 更新日志- Python 3.6.15 final
- Python 3.6.14 final
- Python 3.6.13 final
- Python 3.6.12 final
- Python 3.6.11 final
- Python 3.6.11 release candidate 1
- Python 3.6.10 final
- Python 3.6.10 release candidate 1
- Python 3.6.9 final
- Python 3.6.9 release candidate 1
- Python 3.6.8 final
- Python 3.6.8 release candidate 1
- Python 3.6.7 final
- Python 3.6.7 release candidate 2
- Python 3.6.7 release candidate 1
- Python 3.6.6 正式版
- Python 3.6.6 RC 1
- Python 3.6.5 正式版
- Python 3.6.5 rc1
- Python 3.6.4 正式版
- Python 3.6.4 rc1
- Python 3.6.3 正式版
- Python 3.6.3 rc1
- Python 3.6.2 正式版
- Python 3.6.2 rc2
- Python 3.6.2 rc1
- Python 3.6.1 正式版
- Python 3.6.1 rc1
- Python 3.6.0 正式版
- Python 3.6.0 rc2
- Python 3.6.0 rc1
- Python 3.6.0 beta 4
- Python 3.6.0 beta 3
- Python 3.6.0 beta 2
- Python 3.6.0 beta 1
- Python 3.6.0 alpha 4
- Python 3.6.0 alpha 3
- Python 3.6.0 alpha 2
- Python 3.6.0 alpha 1
- Python 3.5.3 正式版
- Python 3.5.3 rc1
- Python 3.5.2 正式版
- Python 3.5.2 rc1
- Python 3.5.1 正式版
- Python 3.5.1 rc1
- Python 3.5.0 正式版
- Python 3.5.0 rc4
- Python 3.5.0 rc3
- Python 3.5.0 rc2
- Python 3.5.0 rc1
- Python 3.5.0 beta 4
- Python 3.5.0 beta 3
- Python 3.5.0 beta 2
- Python 3.5.0 beta 1
- Python 3.5.0 alpha 4
- Python 3.5.0 alpha 3
- Python 3.5.0 alpha 2
- Python 3.5.0 alpha 1
 
 
- Python 3.6 有什么新变化A
- Python 教程
- Python安装和使用
- Python语言参考- 1. 概述
- 2. 词法分析
- 3. 数据模型
- 4. 执行模型
- 5. 导入系统
- 6. 表达式
- 7. 简单语句- 7.1. 表达式语句
- 7.2. 赋值语句
- 7.3. The assertstatement
- 7.4. The passstatement
- 7.5. The delstatement
- 7.6. The returnstatement
- 7.7. The yieldstatement
- 7.8. The raisestatement
- 7.9. The breakstatement
- 7.10. The continuestatement
- 7.11. The importstatement
- 7.12. The globalstatement
- 7.13. The nonlocalstatement
 
- 8. 复合语句
- 9. 最高层级组件
- 10. 完整的语法规范
 
- Python 标准库- 1. 概述
- 2. 内置函数
- 3. 内置常量
- 4. 内置类型
- 5. 内置异常
- 6. 文本处理服务
- 7. 二进制数据服务
- 8. 数据类型- 8.1. datetime— 基本的日期和时间类型
- 8.2. calendar— 日历相关函数
- 8.3. collections— 容器数据类型
- 8.4. collections.abc— 容器的抽象基类
- 8.5. heapq— 堆队列算法
- 8.6. bisect— 数组二分查找算法
- 8.7. array— 高效的数值数组
- 8.8. weakref— 弱引用
- 8.9. types— 动态类型创建和内置类型名称
- 8.10. copy— 浅层 (shallow) 和深层 (deep) 复制操作
- 8.11. pprint— 数据美化输出
- 8.12. reprlib— 另一种repr()实现
- 8.13. enum— 枚举类型支持
 
- 8.1. 
- 9. 数字和数学模块
- 10. 函数式编程模块
- 11. 文件和目录访问
- 12. 数据持久化- 12.1. pickle—— Python 对象序列化
- 12.2. copyreg— 注意pickle支持函数
- 12.3. shelve— Python 对象持久化
- 12.4. marshal— 内部 Python 对象序列化
- 12.5. dbm— Unix “数据库” 接口
- 12.6. sqlite3— SQLite 数据库 DB-API 2.0 接口模块
 
- 12.1. 
- 13. 数据压缩和存档
- 14. 文件格式
- 15. 加密服务
- 16. 通用操作系统服务- 16.1. os— 操作系统接口模块
- 16.2. io— 处理流的核心工具
- 16.3. time— 时间的访问和转换
- 16.4. argparse— 命令行选项、参数和子命令解析器
- 16.5. getopt— C 风格的命令行选项解析器
- 16.6. 模块 logging— Python 的日志记录工具
- 16.7. logging.config— 日志记录配置
- 16.8. logging.handlers— 日志处理- 16.8.1. StreamHandler
- 16.8.2. FileHandler
- 16.8.3. NullHandler
- 16.8.4. WatchedFileHandler
- 16.8.5. BaseRotatingHandler
- 16.8.6. RotatingFileHandler
- 16.8.7. TimedRotatingFileHandler
- 16.8.8. SocketHandler
- 16.8.9. DatagramHandler
- 16.8.10. SysLogHandler
- 16.8.11. NTEventLogHandler
- 16.8.12. SMTPHandler
- 16.8.13. MemoryHandler
- 16.8.14. HTTPHandler
- 16.8.15. QueueHandler
- 16.8.16. QueueListener
 
- 16.9. getpass— 便携式密码输入工具
- 16.10. curses— 终端字符单元显示的处理
- 16.11. curses.textpad— 用于 curses 程序的文本输入控件
- 16.12. curses.ascii— 用于 ASCII 字符的工具
- 16.13. curses.panel— curses 的 panel 栈扩展
- 16.14. platform— 获取底层平台的标识数据
- 16.15. errno— 标准 errno 系统符号
- 16.16. ctypes— Python 的外部函数库- 16.16.1. ctypes 教程- 16.16.1.1. 载入动态连接库
- 16.16.1.2. 操作导入的动态链接库中的函数
- 16.16.1.3. 调用函数
- 16.16.1.4. 基础数据类型
- 16.16.1.5. 调用函数,继续
- 16.16.1.6. 使用自定义的数据类型调用函数
- 16.16.1.7. 指定必选参数的类型(函数原型)
- 16.16.1.8. 返回类型
- 16.16.1.9. 传递指针(或者传递引用)
- 16.16.1.10. 结构体和联合
- 16.16.1.11. 结构体/联合 字段对齐及字节顺序
- 16.16.1.12. 结构体和联合中的位域
- 16.16.1.13. 数组
- 16.16.1.14. 指针
- 16.16.1.15. 类型强制转换
- 16.16.1.16. 不完整类型
- 16.16.1.17. 回调函数
- 16.16.1.18. 访问 dll 中导出的值
- 16.16.1.19. 意外
- 16.16.1.20. 变长数据类型
 
- 16.16.2. ctypes 参考手册
 
- 16.16.1. ctypes 教程
 
- 16.1. 
- 17. 并发执行- 17.1. threading— 基于线程的并行
- 17.2. multiprocessing— 基于进程的并行
- 17.3. concurrent包
- 17.4. concurrent.futures— 启动并行任务
- 17.5. subprocess— 子进程管理
- 17.6. sched— 事件调度器
- 17.7. queue— 一个同步的队列类
- 17.8. dummy_threading— 可直接替代threading模块。
- 17.9. _thread— 底层多线程 API
- 17.10. _dummy_thread—_thread的替代模块
 
- 17.1. 
- 18. Interprocess Communication and Networking- 18.1. socket— 底层网络接口
- 18.2. ssl— 套接字对象的TLS/SSL封装
- 18.3. select— Waiting for I/O 完成
- 18.4. selectors— 高级 I/O 复用库
- 18.5. asyncio— Asynchronous I/O, event loop, coroutines and tasks- 18.5.1. Base Event Loop- 18.5.1.1. Run an event loop
- 18.5.1.2. Calls
- 18.5.1.3. Delayed calls
- 18.5.1.4. Futures
- 18.5.1.5. Tasks
- 18.5.1.6. Creating connections
- 18.5.1.7. Creating listening connections
- 18.5.1.8. Watch file descriptors
- 18.5.1.9. Low-level socket operations
- 18.5.1.10. Resolve host name
- 18.5.1.11. Connect pipes
- 18.5.1.12. UNIX signals
- 18.5.1.13. Executor
- 18.5.1.14. 错误处理API
- 18.5.1.15. Debug mode
- 18.5.1.16. Server
- 18.5.1.17. Handle
- 18.5.1.18. Event loop examples
 
- 18.5.2. 事件循环
- 18.5.3. Tasks and coroutines
- 18.5.4. Transports and protocols (callback based API)
- 18.5.5. Streams (coroutine based API)
- 18.5.6. Subprocess
- 18.5.7. Synchronization primitives
- 18.5.8. 队列集
- 18.5.9. Develop with asyncio- 18.5.9.1. Debug mode of asyncio
- 18.5.9.2. Cancellation
- 18.5.9.3. Concurrency and multithreading
- 18.5.9.4. Handle blocking functions correctly
- 18.5.9.5. 日志记录
- 18.5.9.6. Detect coroutine objects never scheduled
- 18.5.9.7. Detect exceptions never consumed
- 18.5.9.8. Chain coroutines correctly
- 18.5.9.9. Pending task destroyed
- 18.5.9.10. Close transports and event loops
 
 
- 18.5.1. Base Event Loop
- 18.6. asyncore— 异步socket处理器
- 18.7. asynchat— 异步 socket 指令/响应 处理器
- 18.8. signal— 设置异步事件处理程序
- 18.9. mmap— 内存映射文件支持
 
- 18.1. 
- 19. 互联网数据处理- 19.1. email— 电子邮件与 MIME 处理包- 19.1.1. email.message: 表示一封电子邮件信息
- 19.1.2. email.parser: 解析电子邮件信息
- 19.1.3. email.generator: 生成 MIME 文档
- 19.1.4. email.policy: 策略对象
- 19.1.5. email.errors: 异常和缺陷类
- 19.1.6. email.headerregistry: 自定义标头对象
- 19.1.7. email.contentmanager: 管理 MIME 内容
- 19.1.8. email: 示例
- 19.1.9. email.message.Message: 使用compat32API 来表示电子邮件消息
- 19.1.10. email.mime: 从头创建电子邮件和 MIME 对象
- 19.1.11. email.header: 国际化标头
- 19.1.12. email.charset: 表示字符集
- 19.1.13. email.encoders: 编码器
- 19.1.14. email.utils: 其他工具
- 19.1.15. email.iterators: 迭代器
 
- 19.1.1. 
- 19.2. json— JSON 编码和解码器
- 19.3. mailcap— Mailcap 文件处理
- 19.4. mailbox— 操作多种格式的邮箱
- 19.5. mimetypes— 映射文件夹到 MIME 类型
- 19.6. base64— Base16, Base32, Base64, Base85 数据编码
- 19.7. binhex— 对binhex4文件进行编码和解码
- 19.8. binascii— 二进制和 ASCII 码互转
- 19.9. quopri— 编码与解码经过 MIME 转码的可打印数据
- 19.10. uu— 对 uuencode 文件进行编码与解码
 
- 19.1. 
- 20. 结构化标记处理工具- 20.1. html— 超文本标记语言支持
- 20.2. html.parser— 简单的 HTML 和 XHTML 解析器
- 20.3. html.entities— HTML 一般实体的定义
- 20.4. XML处理模块
- 20.5. xml.etree.ElementTree— ElementTree XML API
- 20.6. xml.dom— 文档对象模型 API
- 20.7. xml.dom.minidom— 最小化的 DOM 实现
- 20.8. xml.dom.pulldom— 支持构建部分 DOM 树
- 20.9. xml.sax— 支持 SAX2 解析器
- 20.10. xml.sax.handler— SAX 处理程序的基类
- 20.11. xml.sax.saxutils— SAX 工具集
- 20.12. xml.sax.xmlreader— 用于 XML 解析器的接口
- 20.13. xml.parsers.expat— 使用 Expat 的快速 XML 解析
 
- 20.1. 
- 21. 互联网协议和支持- 21.1. webbrowser— 方便的Web浏览器控制器
- 21.2. cgi— 通用网关接口支持
- 21.3. cgitb— 用于 CGI 脚本的回溯管理器
- 21.4. wsgiref— WSGI 工具和引用的实现
- 21.5. urllib— URL 处理模块
- 21.6. urllib.request— 用于打开 URL 的可扩展库- 21.6.1. Request 对象
- 21.6.2. OpenerDirector 对象
- 21.6.3. BaseHandler 对象
- 21.6.4. HTTPRedirectHandler 对象
- 21.6.5. HTTPCookieProcessor 对象
- 21.6.6. ProxyHandler 对象
- 21.6.7. HTTPPasswordMgr 对象
- 21.6.8. HTTPPasswordMgrWithPriorAuth 对象
- 21.6.9. AbstractBasicAuthHandler 对象
- 21.6.10. HTTPBasicAuthHandler 对象
- 21.6.11. ProxyBasicAuthHandler 对象
- 21.6.12. AbstractDigestAuthHandler 对象
- 21.6.13. HTTPDigestAuthHandler 对象
- 21.6.14. ProxyDigestAuthHandler 对象
- 21.6.15. HTTPHandler 对象
- 21.6.16. HTTPSHandler 对象
- 21.6.17. FileHandler 对象
- 21.6.18. DataHandler 对象
- 21.6.19. FTPHandler 对象
- 21.6.20. CacheFTPHandler 对象
- 21.6.21. UnknownHandler 对象
- 21.6.22. HTTPErrorProcessor 对象
- 21.6.23. 例子
- 21.6.24. 已停用的接口
- 21.6.25. urllib.request的限制
 
- 21.7. urllib.response— urllib 使用的 Response 类
- 21.8. urllib.parse用于解析 URL
- 21.9. urllib.error— urllib.request 引发的异常类
- 21.10. urllib.robotparser— robots.txt 语法分析程序
- 21.11. http— HTTP 模块
- 21.12. http.client— HTTP 协议客户端
- 21.13. ftplib— FTP 协议客户端
- 21.14. poplib— POP3 协议客户端
- 21.15. imaplib— IMAP4 协议客户端
- 21.16. nntplib— NNTP 协议客户端
- 21.17. smtplib—SMTP协议客户端
- 21.18. smtpd— SMTP 服务器
- 21.19. telnetlib– Telnet 客户端
- 21.20. uuid— RFC 4122 定义的UUID对象
- 21.21. socketserver— 用于网络服务器的框架
- 21.22. http.server— HTTP 服务器
- 21.23. http.cookies— HTTP状态管理
- 21.24. http.cookiejar—— HTTP 客户端的 Cookie 处理
- 21.25. xmlrpc— XMLRPC 服务端与客户端模块
- 21.26. xmlrpc.client— XML-RPC 客户端访问
- 21.27. xmlrpc.server— 基本 XML-RPC 服务器
- 21.28. ipaddress— IPv4/IPv6 操作库
 
- 21.1. 
- 22. 多媒体服务
- 23. 国际化
- 24. 程序框架
- 25. Tk图形用户界面(GUI)- 25.1. tkinter— Tcl/Tk的Python接口
- 25.2. tkinter.ttk— Tk主题小部件
- 25.3. tkinter.tix— TK扩展包
- 25.4. tkinter.scrolledtext— 滚动文字控件
- 25.5. IDLE
- 25.6. 其他图形用户界面(GUI)包
 
- 25.1. 
- 26. 开发工具- 26.1. typing— 类型标注支持
- 26.2. pydoc— 文档生成器和在线帮助系统
- 26.3. doctest— 测试交互性的Python示例
- 26.4. unittest— 单元测试框架
- 26.5. unittest.mock— 模拟对象库
- 26.6. unittest.mock上手指南- 26.6.1. 使用 mock- 26.6.1.1. 模拟方法调用
- 26.6.1.2. 对象上的方法调用的 mock
- 26.6.1.3. Mocking Classes
- 26.6.1.4. Naming your mocks
- 26.6.1.5. Tracking all Calls
- 26.6.1.6. Setting Return Values and Attributes
- 26.6.1.7. Raising exceptions with mocks
- 26.6.1.8. Side effect functions and iterables
- 26.6.1.9. Creating a Mock from an Existing Object
 
- 26.6.2. Patch Decorators
- 26.6.3. Further Examples- 26.6.3.1. Mocking chained calls
- 26.6.3.2. Partial mocking
- 26.6.3.3. Mocking a Generator Method
- 26.6.3.4. Applying the same patch to every test method
- 26.6.3.5. Mocking Unbound Methods
- 26.6.3.6. Checking multiple calls with mock
- 26.6.3.7. Coping with mutable arguments
- 26.6.3.8. Nesting Patches
- 26.6.3.9. Mocking a dictionary with MagicMock
- 26.6.3.10. Mock subclasses and their attributes
- 26.6.3.11. Mocking imports with patch.dict
- 26.6.3.12. Tracking order of calls and less verbose call assertions
- 26.6.3.13. More complex argument matching
 
 
- 26.6.1. 使用 mock
- 26.7. 2to3 - 自动将 Python 2 代码转为 Python 3 代码
- 26.8. test— Python回归测试包
- 26.9. test.support— Utilities for the Python test suite
 
- 26.1. 
- 27. 调试和分析
- 28. 软件打包和分发
- 29. Python运行时服务- 29.1. sys— 系统相关的参数和函数
- 29.2. sysconfig— Provide access to Python’s configuration information
- 29.3. builtins— 内建对象
- 29.4. __main__— 顶层脚本环境
- 29.5. warnings—— 警告信息的控制
- 29.6. contextlib— Utilities forwith-statement contexts- 29.6.1. 工具
- 29.6.2. 例子和配方- 29.6.2.1. Supporting a variable number of context managers
- 29.6.2.2. Simplifying support for single optional context managers
- 29.6.2.3. Catching exceptions from __enter__methods
- 29.6.2.4. Cleaning up in an __enter__implementation
- 29.6.2.5. Replacing any use of try-finallyand flag variables
- 29.6.2.6. Using a context manager as a function decorator
 
- 29.6.3. Single use, reusable and reentrant context managers
 
- 29.7. abc— 抽象基类
- 29.8. atexit— 退出处理器
- 29.9. traceback— 打印或检索堆栈回溯
- 29.10. __future__— Future 语句定义
- 29.11. gc— 垃圾回收器接口
- 29.12. inspect— 检查对象
- 29.13. site—— 站点专属的配置钩子
- 29.14. fpectl— Floating point exception control
 
- 29.1. 
- 30. 自定义 Python 解释器
- 31. 导入模块
- 32. Python 语言服务- 32.1. parser— 访问 Python 解析树
- 32.2. ast— 抽象语法树
- 32.3. symtable——访问编译器的符号表
- 32.4. symbol— 与 Python 解析树一起使用的常量
- 32.5. token— 与Python解析树一起使用的常量
- 32.6. keyword— 检验Python关键字
- 32.7. tokenize– 对 Python 代码使用的标记解析器
- 32.8. tabnanny— 模糊缩进检测
- 32.9. pyclbr— Python class browser support
- 32.10. py_compile— 编译 Python 源文件
- 32.11. compileall— Byte-compile Python libraries
- 32.12. dis— Python 字节码反汇编器
- 32.13. pickletools— pickle 开发者工具集
 
- 32.1. 
- 33. 杂项服务
- 34. Windows系统相关模块
- 35. Unix 专有服务- 35.1. posix— 最常见的 POSIX 系统调用
- 35.2. pwd— 用户密码数据库
- 35.3. spwd—— shadow 密码库
- 35.4. grp— 组数据库
- 35.5. crypt—— 检查 Unix 口令的函数
- 35.6. termios— POSIX 风格的 tty 控制
- 35.7. tty— 终端控制功能
- 35.8. pty— 伪终端工具
- 35.9. fcntl—— 系统调用fcntl和ioctl
- 35.10. pipes— 终端管道接口
- 35.11. resource— 资源使用信息
- 35.12. nis— Sun 的 NIS (黄页) 接口
- 35.13. Unix syslog 库例程
 
- 35.1. 
- 36. 被取代的模块- 36.1. optparse— 解析器的命令行选项- 36.1.1. 背景
- 36.1.2. 教程
- 36.1.3. 参考指南
- 36.1.4. Option Callbacks- 36.1.4.1. Defining a callback option
- 36.1.4.2. How callbacks are called
- 36.1.4.3. Raising errors in a callback
- 36.1.4.4. Callback example 1: trivial callback
- 36.1.4.5. Callback example 2: check option order
- 36.1.4.6. Callback example 3: check option order (generalized)
- 36.1.4.7. Callback example 4: check arbitrary condition
- 36.1.4.8. Callback example 5: fixed arguments
- 36.1.4.9. Callback example 6: variable arguments
 
- 36.1.5. Extending optparse
 
- 36.2. imp—— 由代码内部访问 import 。
 
- 36.1. 
- 37. 未创建文档的模块
 
- 扩展和嵌入 Python 解释器
- Python/C API 参考手册
- 分发 Python 模块
- 安装 Python 模块
- Python 常用指引- 将 Python 2 代码迁移到 Python 3
- 将扩展模块移植到 Python 3
- 用 Python 进行 Curses 编程
- 实现描述器
- 函数式编程指引
- 日志 HOWTO
- 日志操作手册- 在多个模块中记录日志
- 在多个线程中记录日志
- 多个日志处理器以及多种格式化器
- 在多个地方记录日志
- 日志服务器配置示例
- 处理日志处理器的阻塞
- 通过网络发送和接收日志
- 在日志记录中添加上下文信息
- 从多个进程记录至单个文件
- 轮换日志文件
- 使用其他日志格式化方式
- 自定义 LogRecord
- 子类化 QueueHandler - ZeroMQ 示例
- 子类化 QueueListener —— ZeroMQ 示例
- 基于字典进行日志配置的示例
- 利用 rotator 和 namer 自定义日志轮换操作
- 更加详细的多道处理示例
- 在发送给 SysLogHandler 的信息中插入一个 BOM。
- 结构化日志的实现代码
- 利用 dictConfig()自定义 handler
- 生效于整个应用程序的格式化样式
- 利用 dictConfig()定义过滤器
- 异常信息的自定义格式化
- 语音播报日志信息
- 缓冲日志消息并有条件地输出它们
- 通过配置使用UTC (GMT) 格式化时间
- 使用上下文管理器的可选的日志记录
 
- 正则表达式HOWTO
- 套接字编程指南
- 排序指南
- Unicode 指南
- HOWTO 使用 urllib 包获取网络资源
- Argparse 教程
- ipaddress模块介绍
- Argument Clinic How-To- The Goals Of Argument Clinic
- Basic Concepts And Usage
- Converting Your First Function
- Advanced Topics- Symbolic default values
- Renaming the C functions and variables generated by Argument Clinic
- Converting functions using PyArg_UnpackTuple
- Optional Groups
- Using real Argument Clinic converters, instead of “legacy converters”
- Py_buffer
- Advanced converters
- Parameter default values
- The NULLdefault value
- Expressions specified as default values
- Using a return converter
- Cloning existing functions
- Calling Python code
- Using a “self converter”
- Writing a custom converter
- Writing a custom return converter
- METH_O and METH_NOARGS
- tp_new and tp_init functions
- Changing and redirecting Clinic’s output
- The #ifdef trick
- Using Argument Clinic in Python files
 
 
- 使用 DTrace 和 SystemTap 检测CPython
 
- Python 常见问题- Python常见问题
- 编程常见问题
- 设计和历史常见问题- 为什么Python使用缩进来分组语句?
- 为什么简单的算术运算得到奇怪的结果?
- 为什么浮点计算不准确?
- 为什么Python字符串是不可变的?
- 为什么必须在方法定义和调用中显式使用“self”?
- 为什么不能在表达式中赋值?
- 为什么Python对某些功能(例如list.index())使用方法来实现,而其他功能(例如len(List))使用函数实现?
- 为什么 join()是一个字符串方法而不是列表或元组方法?
- 异常有多快?
- 为什么Python中没有switch或case语句?
- 难道不能在解释器中模拟线程,而非得依赖特定于操作系统的线程实现吗?
- 为什么lambda表达式不能包含语句?
- 可以将Python编译为机器代码,C或其他语言吗?
- Python如何管理内存?
- 为什么CPython不使用更传统的垃圾回收方案?
- CPython退出时为什么不释放所有内存?
- 为什么有单独的元组和列表数据类型?
- 列表是如何在CPython中实现的?
- 字典是如何在CPython中实现的?
- 为什么字典key必须是不可变的?
- 为什么 list.sort() 没有返回排序列表?
- 如何在Python中指定和实施接口规范?
- 为什么没有goto?
- 为什么原始字符串(r-strings)不能以反斜杠结尾?
- 为什么Python没有属性赋值的“with”语句?
- 为什么 if/while/def/class语句需要冒号?
- 为什么Python在列表和元组的末尾允许使用逗号?
 
- 代码库和插件 FAQ
- 扩展/嵌入常见问题- 可以使用C语言中创建自己的函数吗?
- 可以使用C++语言中创建自己的函数吗?
- C很难写,有没有其他选择?
- 如何在 C 中执行任意 Python 语句?
- 如何在 C 中对任意 Python 表达式求值?
- 如何从Python对象中提取C的值?
- 如何使用Py_BuildValue()创建任意长度的元组?
- 如何从C调用对象的方法?
- 如何捕获PyErr_Print()(或打印到stdout / stderr的任何内容)的输出?
- 如何从C访问用Python编写的模块?
- 如何在 Python 中对接 C ++ 对象?
- 我使用Setup文件添加了一个模块,为什么make失败了?
- 如何调试扩展?
- 我想在Linux系统上编译一个Python模块,但是缺少一些文件。为什么?
- 如何区分“输入不完整”和“输入无效”?
- 如何找到未定义的g++符号__builtin_new或__pure_virtual?
- 能否创建一个对象类,其中部分方法在C中实现,而其他方法在Python中实现(例如通过继承)?
 
- Python在Windows上的常见问题
- 图形用户界面(GUI)常见问题
- “为什么我的电脑上安装了 Python ?”
 
- 术语对照表
- 文档说明
- 解决 Bug
- Copyright
- 历史和许可证
