Python文档内容¶
- Python 有什么新变化?
- Python 3.8 有什么新变化
- 摘要 - 发布重点
- 新的特性
- 其他语言特性修改
- 新增模块
- 改进的模块
- ast
- asyncio
- builtins
- collections
- curses
- ctypes
- datetime
- functools
- gc
- gettext
- gzip
- idlelib 与 IDLE
- inspect
- io
- json.tool
- math
- mmap
- multiprocessing
- os
- os.path
- pathlib
- pickle
- plistlib
- py_compile
- shlex
- shutil
- socket
- ssl
- statistics
- sys
- tarfile
- threading
- tokenize
- tkinter
- time
- typing
- unicodedata
- unittest
- venv
- weakref
- xml
- 性能优化
- 构建和 C API 的改变
- 弃用
- API 与特性的移除
- 移植到 Python 3.8
- Python 3.7 有什么新变化
- 摘要 - 发布重点
- 新的特性
- 其他语言特性修改
- 新增模块
- 改进的模块
- argparse
- asyncio
- binascii
- calendar
- collections
- compileall
- concurrent.futures
- contextlib
- cProfile
- crypt
- datetime
- dbm
- decimal
- dis
- distutils
- enum
- functools
- gc
- hmac
- http.client
- http.server
- idlelib 与 IDLE
- importlib
- io
- ipaddress
- itertools
- locale
- logging
- math
- mimetypes
- msilib
- multiprocessing
- os
- pathlib
- pdb
- py_compile
- pydoc
- queue
- re
- signal
- socket
- socketserver
- sqlite3
- ssl
- string
- subprocess
- sys
- time
- tkinter
- tracemalloc
- types
- unicodedata
- unittest
- unittest.mock
- urllib.parse
- uu
- uuid
- warnings
- xml.etree
- xmlrpc.server
- zipapp
- zipfile
- C API 的改变
- 构建的改变
- 性能优化
- 其他 CPython 实现的改变
- 已弃用的 Python 行为
- 已弃用的 Python 模块、函数和方法
- 已弃用的 C API 函数和类型
- 平台支持的移除
- API 与特性的移除
- 移除的模块
- Windows 专属的改变
- 移植到 Python 3.7
- Python 3.7.1 中的重要变化
- Python 3.7.2 中的重要变化
- Python 3.6 有什么新变化
- 摘要 - 发布重点
- 新的特性
- PEP 498: 格式化的字符串文字
- PEP 526: 变量注释的语法
- PEP 515: 数字文字中的下划线。
- PEP 525: 异步生成器
- PEP 530: Asynchronous Comprehensions
- PEP 487: Simpler customization of class creation
- PEP 487: Descriptor Protocol Enhancements
- PEP 519: Adding a file system path protocol
- PEP 495: Local Time Disambiguation
- PEP 529: Change Windows filesystem encoding to UTF-8
- PEP 528: Change Windows console encoding to UTF-8
- PEP 520: Preserving Class Attribute Definition Order
- PEP 468: Preserving Keyword Argument Order
- New dict implementation
- PEP 523: Adding a frame evaluation API to CPython
- PYTHONMALLOC environment variable
- DTrace and SystemTap probing support
- 其他语言特性修改
- 新增模块
- 改进的模块
- 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
- traceback
- 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.5 有什么新变化
- 摘要 - 发布重点
- 新的特性
- PEP 492 - Coroutines with async and await syntax
- PEP 465 - A dedicated infix operator for matrix multiplication
- PEP 448 - Additional Unpacking Generalizations
- PEP 461 - percent formatting support for bytes and bytearray
- PEP 484 - Type Hints
- 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
- traceback
- types
- unicodedata
- unittest
- unittest.mock
- urllib
- wsgiref
- xmlrpc
- xml.sax
- zipfile
- Other module-level changes
- 性能优化
- 构建和 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
- traceback
- types
- urllib
- unittest
- venv
- wave
- weakref
- xml.etree
- zipfile
- CPython Implementation Changes
- 弃用
- 移除
- Porting to Python 3.4
- Changed in 3.4.3
- Python 3.3 有什么新变化
- 摘要 - 发布重点
- PEP 405: Virtual Environments
- PEP 420: Implicit Namespace Packages
- PEP 3118: New memoryview implementation and buffer protocol documentation
- PEP 393: Flexible String Representation
- PEP 397: Python Launcher for Windows
- PEP 3151: Reworking the OS and IO exception hierarchy
- PEP 380: Syntax for Delegating to a Subgenerator
- PEP 409: Suppressing exception context
- PEP 414: Explicit Unicode literals
- PEP 3155: Qualified name for classes and functions
- PEP 412: Key-Sharing Dictionary
- PEP 362: Function Signature Object
- PEP 421: Adding sys.implementation
- Using importlib as the Implementation of Import
- 其他语言特性修改
- A Finer-Grained Import Lock
- Builtin functions and types
- 新增模块
- 改进的模块
- abc
- array
- base64
- binascii
- bz2
- codecs
- 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 的改变
- 弃用
- Porting to Python 3.3
- Python 3.2 有什么新变化
- PEP 384: Defining a Stable ABI
- PEP 389: Argparse Command Line Parsing Module
- PEP 391: Dictionary Based Configuration for Logging
- PEP 3148: The
concurrent.futures
module - PEP 3147: PYC Repository Directories
- PEP 3149: ABI Version Tagged .so Files
- PEP 3333: Python Web Server Gateway Interface v1.0.1
- 其他语言特性修改
- New, Improved, and Deprecated Modules
- elementtree
- functools
- itertools
- collections
- threading
- datetime and time
- math
- abc
- io
- reprlib
- logging
- csv
- contextlib
- decimal and fractions
- ftp
- popen
- select
- gzip and 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
- Code Repository
- 构建和 C API 的改变
- Porting to Python 3.2
- Python 3.1 有什么新变化
- Python 3.0 有什么新变化
- Python 2.7 有什么新变化
- The Future for Python 2.x
- Changes to the Handling of Deprecation Warnings
- Python 3.1 Features
- PEP 372: Adding an Ordered Dictionary to collections
- PEP 378: Format Specifier for Thousands Separator
- 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
- 其他语言特性修改
- New and Improved Modules
- 构建和 C API 的改变
- Other Changes and Fixes
- Porting to 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: HTTPS verification migration tools for Python 2.7
- New
make regen-all
build target - Removal of
make touch
build target
- 致谢
- Python 2.6 有什么新变化
- Python 3.0
- Changes to the Development Process
- PEP 343: The 'with' statement
- PEP 366: Explicit Relative Imports From a Main Module
- PEP 370: Per-user
site-packages
Directory - PEP 371: The
multiprocessing
Package - PEP 3101: Advanced String Formatting
- PEP 3105:
print
As a Function - PEP 3110: Exception-Handling Changes
- PEP 3112: Byte Literals
- PEP 3116: New I/O Library
- PEP 3118: Revised Buffer Protocol
- PEP 3119: Abstract Base Classes
- PEP 3127: Integer Literal Support and Syntax
- PEP 3129: Class Decorators
- PEP 3141: A Type Hierarchy for Numbers
- 其他语言特性修改
- New and Improved Modules
- Deprecations and Removals
- 构建和 C API 的改变
- Porting to Python 2.6
- 致谢
- Python 2.5 有什么新变化
- PEP 308: Conditional Expressions
- PEP 309: Partial Function Application
- PEP 314: Metadata for Python Software Packages v1.1
- PEP 328: Absolute and Relative Imports
- PEP 338: Executing Modules as Scripts
- PEP 341: Unified try/except/finally
- PEP 342: New Generator Features
- PEP 343: The 'with' statement
- PEP 352: Exceptions as New-Style Classes
- PEP 353: Using ssize_t as the index type
- PEP 357: The '__index__' method
- 其他语言特性修改
- New, Improved, and Removed Modules
- 构建和 C API 的改变
- Porting to Python 2.5
- 致谢
- Python 2.4 有什么新变化
- PEP 218: Built-In Set Objects
- PEP 237: Unifying Long Integers and Integers
- PEP 289: Generator Expressions
- PEP 292: Simpler String Substitutions
- PEP 318: Decorators for Functions and Methods
- PEP 322: Reverse Iteration
- PEP 324: New subprocess Module
- PEP 327: Decimal Data Type
- PEP 328: Multi-line Imports
- PEP 331: Locale-Independent Float/String Conversions
- 其他语言特性修改
- New, Improved, and Deprecated Modules
- 构建和 C API 的改变
- Porting to Python 2.4
- 致谢
- Python 2.3 有什么新变化
- PEP 218: A Standard Set Datatype
- PEP 255: Simple Generators
- PEP 263: Source Code Encodings
- PEP 273: Importing Modules from ZIP Archives
- PEP 277: Unicode file name support for Windows NT
- PEP 278: Universal Newline Support
- PEP 279: enumerate()
- PEP 282: The logging Package
- PEP 285: A Boolean Type
- PEP 293: Codec Error Handling Callbacks
- PEP 301: Package Index and Metadata for Distutils
- PEP 302: New Import Hooks
- PEP 305: Comma-separated Files
- PEP 307: Pickle Enhancements
- Extended Slices
- 其他语言特性修改
- New, Improved, and Deprecated Modules
- Pymalloc: A Specialized Object Allocator
- 构建和 C API 的改变
- Other Changes and Fixes
- Porting to 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
- New and Improved Modules
- Other Changes and Fixes
- 致谢
- Python 2.0 有什么新变化
- 概述
- What About Python 1.6?
- New Development Process
- Unicode
- 列表推导式
- Augmented Assignment
- 字符串的方法
- Garbage Collection of Cycles
- Other Core Changes
- Porting to 2.0
- Extending/Embedding Changes
- Distutils: Making Modules Easy to Install
- XML Modules
- Module changes
- New modules
- IDLE Improvements
- Deleted and Deprecated Modules
- 致谢
- 更新日志
- Python 下一版
- Python 3.8.0 final
- Python 3.8.0 release candidate 1
- Python 3.8.0 beta 4
- Python 3.8.0 beta 3
- Python 3.8.0 beta 2
- Python 3.8.0 beta 1
- Python 3.8.0 alpha 4
- Python 3.8.0 alpha 3
- Python 3.8.0 alpha 2
- Python 3.8.0 alpha 1
- Python 3.7.0 正式版
- Python 3.7.0 release candidate 1
- Python 3.7.0 beta 5
- Python 3.7.0 beta 4
- Python 3.7.0 beta 3
- Python 3.7.0 beta 2
- Python 3.7.0 beta 1
- Python 3.7.0 alpha 4
- Python 3.7.0 alpha 3
- Python 3.7.0 alpha 2
- Python 3.7.0 alpha 1
- Python 3.6.6 final
- Python 3.6.6 RC 1
- Python 3.6.5 final
- Python 3.6.5 release candidate 1
- Python 3.6.4 final
- Python 3.6.4 release candidate 1
- Python 3.6.3 final
- Python 3.6.3 release candidate 1
- Python 3.6.2 final
- Python 3.6.2 release candidate 2
- Python 3.6.2 release candidate 1
- Python 3.6.1 final
- Python 3.6.1 release candidate 1
- Python 3.6.0 final
- Python 3.6.0 release candidate 2
- Python 3.6.0 release candidate 1
- 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.5 final
- Python 3.5.5 release candidate 1
- Python 3.5.4 final
- Python 3.5.4 release candidate 1
- Python 3.5.3 final
- Python 3.5.3 release candidate 1
- Python 3.5.2 final
- Python 3.5.2 release candidate 1
- Python 3.5.1 final
- Python 3.5.1 release candidate 1
- Python 3.5.0 final
- Python 3.5.0 release candidate 4
- Python 3.5.0 release candidate 3
- Python 3.5.0 release candidate 2
- Python 3.5.0 release candidate 1
- 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.8 有什么新变化
- Python 教程
- 1. 课前甜点
- 2. 使用 Python 解释器
- 3. Python 的非正式介绍
- 4. 其他流程控制工具
- 5. 数据结构
- 6. 模块
- 7. 输入输出
- 8. 错误和异常
- 9. 类
- 10. 标准库简介
- 11. 标准库简介 —— 第二部分
- 12. 虚拟环境和包
- 13. 接下来?
- 14. 交互式编辑和编辑历史
- 15. 浮点算术:争议和限制
- 16. 附录
- 安装和使用 Python
- Python 语言参考
- 1. 概述
- 2. 词法分析
- 3. 数据模型
- 4. 执行模型
- 5. 导入系统
- 6. 表达式
- 7. 简单语句
- 8. 复合语句
- 9. 最高层级组件
- 10. 完整的语法规范
- Python 标准库
- 概述
- 内置函数
- 内置常量
- 内置类型
- 内置异常
- 文本处理服务
- 二进制数据服务
- 数据类型
datetime
--- 基本的日期和时间类型calendar
--- 日历相关函数collections
--- 容器数据类型collections.abc
--- 容器的抽象基类heapq
--- 堆队列算法bisect
--- 数组二分查找算法array
--- 高效的数值数组weakref
--- 弱引用types
--- 动态类型创建和内置类型名称copy
--- 浅层 (shallow) 和深层 (deep) 复制操作pprint
--- 数据美化输出reprlib
--- 另一种repr()
实现enum
--- 对枚举的支持
- 数字和数学模块
- 函数式编程模块
- 文件和目录访问
pathlib
--- 面向对象的文件系统路径os.path
--- 常见路径操作fileinput
--- Iterate over lines from multiple input streamsstat
--- Interpretingstat()
resultsfilecmp
--- 文件及目录的比较tempfile
--- Generate temporary files and directoriesglob
--- Unix style pathname pattern expansionfnmatch
--- Unix filename pattern matchinglinecache
--- 随机读写文本行shutil
--- High-level file operations
- 数据持久化
pickle
—— Python 对象序列化copyreg
--- 注意pickle
支持函数shelve
--- Python object persistencemarshal
--- Internal Python object serializationdbm
--- Interfaces to Unix "databases"sqlite3
--- SQLite 数据库 DB-API 2.0 接口模块
- 数据压缩和存档
- 文件格式
- 加密服务
- 通用操作系统服务
os
--- 操作系统接口模块io
--- 处理流的核心工具time
--- 时间的访问和转换argparse
--- 命令行选项、参数和子命令解析器getopt
--- C-style parser for command line options- 模块
logging
--- Python 的日志记录工具 logging.config
--- 日志记录配置logging.handlers
--- Logging handlersgetpass
--- 便携式密码输入工具curses
--- 终端字符单元显示的处理curses.textpad
--- Text input widget for curses programscurses.ascii
--- Utilities for ASCII characterscurses.panel
--- A panel stack extension for cursesplatform
--- 获取底层平台的标识数据errno
--- Standard errno system symbolsctypes
--- Python 的外部函数库- ctypes 教程
- 载入动态连接库
- 操作导入的动态链接库中的函数
- 调用函数
- 基础数据类型
- 调用函数,继续
- 使用自定义的数据类型调用函数
- Specifying the required argument types (function prototypes)
- Return types
- Passing pointers (or: passing parameters by reference)
- Structures and unions
- Structure/union alignment and byte order
- Bit fields in structures and unions
- Arrays
- Pointers
- Type conversions
- Incomplete Types
- Callback functions
- Accessing values exported from dlls
- Surprises
- Variable-sized data types
- ctypes reference
- ctypes 教程
- 并发执行
threading
--- 基于线程的并行multiprocessing
--- 基于进程的并行multiprocessing.shared_memory
--- 可从进程直接访问的共享内存concurrent
包concurrent.futures
--- 启动并行任务subprocess
--- 子进程管理sched
--- 事件调度器queue
--- 一个同步的队列类_thread
--- 底层多线程 API_dummy_thread
---_thread
的替代模块dummy_threading
--- 可直接替代threading
模块。
contextvars
--- Context Variables- 网络和进程间通信
asyncio
--- 异步 I/Osocket
--- 底层网络接口ssl
--- TLS/SSL wrapper for socket objectsselect
--- 等待 I/O 完成selectors
--- 高级 I/O 复用库asyncore
--- 异步socket处理器asynchat
--- 异步 socket 指令/响应 处理器signal
--- 设置异步事件处理程序mmap
--- 内存映射文件支持
- 互联网数据处理
email
--- 电子邮件与 MIME 处理包email.message
: Representing an email messageemail.parser
: Parsing email messagesemail.generator
: Generating MIME documentsemail.policy
: Policy Objectsemail.errors
: 异常和缺陷类email.headerregistry
: Custom Header Objectsemail.contentmanager
: Managing MIME Contentemail
: 示例email.message.Message
: Representing an email message using thecompat32
APIemail.mime
: Creating email and MIME objects from scratchemail.header
: Internationalized headersemail.charset
: Representing character setsemail.encoders
: 编码器email.utils
: 其他工具email.iterators
: 迭代器
json
--- JSON 编码和解码器mailcap
--- Mailcap file handlingmailbox
--- Manipulate mailboxes in various formatsmimetypes
--- Map filenames to MIME typesbase64
--- Base16, Base32, Base64, Base85 数据编码binhex
--- 对binhex4文件进行编码和解码binascii
--- 二进制和 ASCII 码互转quopri
--- 编码与解码经过 MIME 转码的可打印数据uu
--- 对 uuencode 文件进行编码与解码
- 结构化标记处理工具
html
--- 超文本标记语言支持html.parser
--- 简单的 HTML 和 XHTML 解析器html.entities
--- HTML 一般实体的定义- XML处理模块
xml.etree.ElementTree
--- ElementTree XML APIxml.dom
--- The Document Object Model APIxml.dom.minidom
--- Minimal DOM implementationxml.dom.pulldom
--- Support for building partial DOM treesxml.sax
--- Support for SAX2 parsersxml.sax.handler
--- Base classes for SAX handlersxml.sax.saxutils
--- SAX Utilitiesxml.sax.xmlreader
--- Interface for XML parsersxml.parsers.expat
--- Fast XML parsing using Expat
- 互联网协议和支持
webbrowser
--- 方便的Web浏览器控制器cgi
--- Common Gateway Interface supportcgitb
--- 用于 CGI 脚本的回溯管理器wsgiref
--- WSGI Utilities and Reference Implementationurllib
--- URL 处理模块urllib.request
--- 用于打开 URL 的可扩展库- Request Objects
- OpenerDirector Objects
- BaseHandler Objects
- HTTPRedirectHandler Objects
- HTTPCookieProcessor Objects
- ProxyHandler Objects
- HTTPPasswordMgr Objects
- HTTPPasswordMgrWithPriorAuth Objects
- AbstractBasicAuthHandler Objects
- HTTPBasicAuthHandler Objects
- ProxyBasicAuthHandler Objects
- AbstractDigestAuthHandler Objects
- HTTPDigestAuthHandler Objects
- ProxyDigestAuthHandler Objects
- HTTPHandler Objects
- HTTPSHandler Objects
- FileHandler Objects
- DataHandler Objects
- FTPHandler Objects
- CacheFTPHandler Objects
- UnknownHandler Objects
- HTTPErrorProcessor Objects
- 示例
- Legacy interface
urllib.request
Restrictions
urllib.response
--- urllib 使用的 Response 类urllib.parse
--- Parse URLs into componentsurllib.error
--- urllib.request 引发的异常类urllib.robotparser
--- robots.txt 语法分析程序http
--- HTTP 模块http.client
--- HTTP 协议客户端ftplib
--- FTP protocol clientpoplib
--- POP3 protocol clientimaplib
--- IMAP4 protocol clientnntplib
--- NNTP protocol clientsmtplib
---SMTP协议客户端smtpd
--- SMTP 服务器telnetlib
--- Telnet clientuuid
--- UUID objects according to RFC 4122socketserver
--- A framework for network servershttp.server
--- HTTP 服务器http.cookies
--- HTTP状态管理http.cookiejar
—— HTTP 客户端的 Cookie 处理xmlrpc
--- XMLRPC 服务端与客户端模块xmlrpc.client
--- XML-RPC client accessxmlrpc.server
--- Basic XML-RPC serversipaddress
--- IPv4/IPv6 manipulation library
- 多媒体服务
- 国际化
- 程序框架
- Tk图形用户界面(GUI)
tkinter
--- Tcl/Tk的Python接口tkinter.ttk
--- Tk主题小部件tkinter.tix
--- Extension widgets for Tktkinter.scrolledtext
--- 滚动文字控件- IDLE
- 其他图形用户界面(GUI)包
- 开发工具
typing
--- 类型标注支持pydoc
--- Documentation generator and online help systemdoctest
--- 测试交互性的Python示例unittest
--- 单元测试框架unittest.mock
--- mock对象库unittest.mock
上手指南- 使用 mock
- Patch Decorators
- Further Examples
- Mocking chained calls
- Partial mocking
- Mocking a Generator Method
- Applying the same patch to every test method
- Mocking Unbound Methods
- Checking multiple calls with mock
- Coping with mutable arguments
- Nesting Patches
- Mocking a dictionary with MagicMock
- Mock subclasses and their attributes
- Mocking imports with patch.dict
- Tracking order of calls and less verbose call assertions
- More complex argument matching
- 2to3 - 自动将 Python 2 代码转为 Python 3 代码
test
--- Regression tests package for Pythontest.support
--- Utilities for the Python test suitetest.support.script_helper
--- Utilities for the Python execution tests
- 调试和分析
- 软件打包和分发
- Python运行时服务
sys
--- 系统相关的参数和函数sysconfig
--- Provide access to Python's configuration informationbuiltins
--- 内建对象__main__
--- 顶层脚本环境warnings
--- Warning controldataclasses
--- 数据类contextlib
--- Utilities forwith
-statement contextsabc
--- 抽象基类atexit
--- 退出处理器traceback
--- 打印或检索堆栈回溯__future__
--- Future 语句定义gc
--- 垃圾回收器接口inspect
--- 检查对象site
--- Site-specific configuration hook
- 自定义 Python 解释器
- 导入模块
zipimport
--- Import modules from Zip archivespkgutil
--- Package extension utilitymodulefinder
--- 查找脚本使用的模块runpy
--- Locating and executing Python modulesimportlib
---import
的实现- Using importlib.metadata
- Python 语言服务
parser
--- Access Python parse treesast
--- 抽象语法树symtable
--- Access to the compiler's symbol tablessymbol
--- 与 Python 解析树一起使用的常量token
--- 与Python解析树一起使用的常量keyword
--- 检验Python关键字tokenize
--- Tokenizer for Python sourcetabnanny
--- 模糊缩进检测pyclbr
--- Python class browser supportpy_compile
--- Compile Python source filescompileall
--- Byte-compile Python librariesdis
--- Python 字节码反汇编器pickletools
--- Tools for pickle developers
- 杂项服务
- Windows系统相关模块
- Unix 专有服务
posix
--- The most common POSIX system callspwd
--- 用户密码数据库spwd
--- The shadow password databasegrp
--- The group databasecrypt
--- Function to check Unix passwordstermios
--- POSIX style tty controltty
--- 终端控制功能pty
--- Pseudo-terminal utilitiesfcntl
--- Thefcntl
andioctl
system callspipes
--- Interface to shell pipelinesresource
--- Resource usage informationnis
--- Interface to Sun's NIS (Yellow Pages)- Unix syslog 库例程
- 被取代的模块
optparse
--- 解析器的命令行选项- 背景
- 教程
- 参考指南
- Option Callbacks
- Defining a callback option
- How callbacks are called
- Raising errors in a callback
- Callback example 1: trivial callback
- Callback example 2: check option order
- Callback example 3: check option order (generalized)
- Callback example 4: check arbitrary condition
- Callback example 5: fixed arguments
- Callback example 6: variable arguments
- Extending
optparse
imp
--- Access the import internals
- 未创建文档的模块
- 扩展和嵌入 Python 解释器
- Python/C API 参考手册
- 概述
- 稳定的应用程序二进制接口
- The Very High Level Layer
- 引用计数
- 异常处理
- 工具
- 抽象对象层
- 具体的对象层
- Initialization, Finalization, and Threads
- Python初始化配置
- 内存管理
- 对象实现支持
- API 和 ABI 版本管理
- 分发 Python 模块
- 安装 Python 模块
- Python 常用指引
- 将 Python 2 代码迁移到 Python 3
- 简要说明
- 详情
- 删除对Python 2.6及更早版本的支持
- Make sure you specify the proper version support in your
setup.py
file - 良好的测试覆盖率
- 了解Python 2 和 3之间的区别
- 更新代码
- Prevent compatibility regressions
- Check which dependencies block your transition
- Update your
setup.py
file to denote Python 3 compatibility - Use continuous integration to stay compatible
- 考虑使用可选的静态类型检查
- 将扩展模块移植到 Python 3
- Curses Programming with Python
- 实现描述器
- 函数式编程指引
- 日志 HOWTO
- 日志操作手册
- 在多个模块中使用日志
- 在多线程中使用日志
- 使用多个日志处理器和多种格式化
- 在多个地方记录日志
- 日志服务器配置示例
- 处理日志处理器的阻塞
- 通过网络发送和接收日志
- 在日志记录中添加上下文信息
- 从多个进程记录至单个文件
- 轮换日志文件
- 使用其他日志格式化方式
- Customizing
LogRecord
- Subclassing QueueHandler - a ZeroMQ example
- Subclassing QueueListener - a ZeroMQ example
- An example dictionary-based configuration
- Using a rotator and namer to customize log rotation processing
- A more elaborate multiprocessing example
- Inserting a BOM into messages sent to a SysLogHandler
- Implementing structured logging
- Customizing handlers with
dictConfig()
- Using particular formatting styles throughout your application
- Configuring filters with
dictConfig()
- Customized exception formatting
- Speaking logging messages
- 缓冲日志消息并有条件地输出它们
- 通过配置使用UTC (GMT) 格式化时间
- 使用上下文管理器进行选择性记录
- A CLI application starter template
- A Qt GUI for logging
- 正则表达式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
NULL
default 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 2 代码迁移到 Python 3
- 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
- 版权
- 历史和许可证