Python 文檔目錄?
- Python的新變化
- 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
- 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.7.6 中的重要變化
- Python 3.7.10 中的重要變化
- Notable changes in Python 3.7.11
- 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
- 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-all
build target - Removal of
make touch
build 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.7.13 final
- Python 3.7.12 final
- Python 3.7.11 final
- Python 3.7.10 final
- Python 3.7.9 最終版
- Python 3.7.8 最終版
- Python 3.7.8 發布候選版 1
- Python 3.7.7 final
- Python 3.7.7 release candidate 1
- Python 3.7.6 final
- Python 3.7.6 release candidate 1
- Python 3.7.5 final
- Python 3.7.5 release candidate 1
- Python 3.7.4 final
- Python 3.7.4 release candidate 2
- Python 3.7.4 release candidate 1
- Python 3.7.3 最終版
- Python 3.7.3 發布候選版 1
- Python 3.7.2 最終版
- Python 3.7.2 發布候選版 1
- Python 3.7.1 最終版
- Python 3.7.1 RC 2版本
- Python 3.7.1 發布候選版 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 正式版
- 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.5 正式版
- Python 3.5.5 rc1
- Python 3.5.4 正式版
- Python 3.5.4 rc1
- 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.7 有什么新變化
- Python 教程
- 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
--- 枚舉類型支持
- 數字和數學模塊
- 函數式編程模塊
- 文件和目錄訪問
- 數據持久化
- 數據壓縮和存檔
- 文件格式
- 加密服務
- 通用操作系統服務
os
--- 操作系統接口模塊io
--- 處理流的核心工具time
--- 時間的訪問和轉換argparse
--- 命令行選項、參數和子命令解析器getopt
--- C 風格的命令行選項解析器- 模塊
logging
--- Python 的日志記錄工具 logging.config
--- 日志記錄配置logging.handlers
--- 日志處理getpass
--- 便攜式密碼輸入工具curses
--- 終端字符單元顯示的處理curses.textpad
--- 用于 curses 程序的文本輸入控件curses.ascii
--- 用于 ASCII 字符的工具curses.panel
--- curses 的 panel 棧擴展platform
--- 獲取底層平臺的標識數據errno
--- 標準 errno 系統符號ctypes
--- Python 的外部函數庫
- 并發執行
contextvars
上下文變量- 網絡和進程間通信
- 互聯網數據處理
email
--- 電子郵件與 MIME 處理包email.message
: 表示一封電子郵件信息email.parser
: 解析電子郵件信息email.generator
: 生成 MIME 文檔email.policy
: 策略對象email.errors
: 異常和缺陷類email.headerregistry
: 自定義標頭對象email.contentmanager
: 管理 MIME 內容email
: 示例email.message.Message
: 使用compat32
API 來表示電子郵件消息email.mime
: 從頭創建電子郵件和 MIME 對象email.header
: 國際化標頭email.charset
: 表示字符集email.encoders
: 編碼器email.utils
: 其他工具email.iterators
: 迭代器
json
--- JSON 編碼和解碼器mailcap
--- Mailcap 文件處理mailbox
--- 操作多種格式的郵箱mimetypes
--- 映射文件夾到 MIME 類型base64
--- 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
--- 文檔對象模型 APIxml.dom.minidom
--- 最小化的 DOM 實現xml.dom.pulldom
--- 支持構建部分 DOM 樹xml.sax
--- 支持 SAX2 解析器xml.sax.handler
--- SAX 處理程序的基類xml.sax.saxutils
--- SAX 工具集xml.sax.xmlreader
--- 用于 XML 解析器的接口xml.parsers.expat
--- 使用 Expat 的快速 XML 解析
- 互聯網協議和支持
webbrowser
--- 方便的Web瀏覽器控制器cgi
--- 通用網關接口支持cgitb
--- 用于 CGI 腳本的回溯管理器wsgiref
--- WSGI 工具和引用的實現urllib
--- URL 處理模塊urllib.request
--- 用于打開 URL 的可擴展庫- 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
用于解析 URLurllib.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
--- RFC 4122 定義的UUID對象socketserver
--- 用于網絡服務器的框架http.server
--- HTTP 服務器http.cookies
--- HTTP狀態管理http.cookiejar
—— HTTP 客戶端的 Cookie 處理xmlrpc
--- XMLRPC 服務端與客戶端模塊xmlrpc.client
--- XML-RPC 客戶端訪問xmlrpc.server
--- 基本 XML-RPC 服務器ipaddress
--- IPv4/IPv6 操作庫
- 多媒體服務
- 國際化
- 程序框架
- Tk圖形用戶界面(GUI)
- 開發工具
typing
--- 類型標注支持pydoc
--- 文檔生成器和在線幫助系統doctest
--- 測試交互性的Python示例unittest
--- 單元測試框架unittest.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
--- Python回歸測試包test.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
—— 警告信息的控制dataclasses
--- 數據類contextlib
--- 為with
語句上下文提供的工具abc
--- 抽象基類atexit
--- 退出處理器traceback
--- 打印或檢索堆棧回溯__future__
--- Future 語句定義gc
--- 垃圾回收器接口inspect
--- 檢查對象site
—— 站點專屬的配置鉤子
- 自定義 Python 解釋器
- 導入模塊
- Python 語言服務
parser
--- 訪問 Python 解析樹ast
--- 抽象語法樹symtable
——訪問編譯器的符號表symbol
--- 與 Python 解析樹一起使用的常量token
--- 與Python解析樹一起使用的常量keyword
--- 檢驗Python關鍵字tokenize
-- 對 Python 代碼使用的標記解析器tabnanny
--- 模糊縮進檢測pyclbr
--- Python 模塊瀏覽器支持py_compile
--- 編譯 Python 源文件compileall
--- Byte-compile Python librariesdis
--- Python 字節碼反匯編器pickletools
--- pickle 開發者工具集
- 雜項服務
- Windows系統相關模塊
- Unix 專有服務
- 被取代的模塊
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
—— 由代碼內部訪問 import 。
- 未創建文檔的模塊
- 擴展和嵌入 Python 解釋器
- Python/C API 參考手冊
- 概述
- 穩定的應用程序二進制接口
- The Very High Level Layer
- 引用計數
- 異常處理
- 工具
- 抽象對象層
- 具體的對象層
- 初始化,終結和線程
- 內存管理
- 對象實現支持
- API 和 ABI 版本管理
- 分發 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) 格式化時間
- 使用上下文管理器的可選的日志記錄
- 命令行日志應用起步
- Qt GUI 日志示例
- 正則表達式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 常見問題
- 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
- 歷史和許可證