Python/docs/3.9/py-modindex
Python 模块索引
_ | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | z
_ | ||
__future__
|
Future statement definitions | |
__main__
|
The environment where the top-level script is run. | |
_thread
|
Low-level threading API. | |
a | ||
abc
|
Abstract base classes according to :pep:`3119`. | |
aifc
|
Read and write audio files in AIFF or AIFC format. | |
argparse
|
Command-line option and argument parsing library. | |
array
|
Space efficient arrays of uniformly typed numeric values. | |
ast
|
Abstract Syntax Tree classes and manipulation. | |
asynchat
|
Support for asynchronous command/response protocols. | |
asyncio
|
Asynchronous I/O. | |
asyncore
|
A base class for developing asynchronous socket handling
services. | |
atexit
|
Register and execute cleanup functions. | |
audioop
|
Manipulate raw audio data. | |
b | ||
base64
|
RFC 3548: Base16, Base32, Base64 Data Encodings;
Base85 and Ascii85 | |
bdb
|
Debugger framework. | |
binascii
|
Tools for converting between binary and various ASCII-encoded binary
representations. | |
binhex
|
Encode and decode files in binhex4 format. | |
bisect
|
Array bisection algorithms for binary searching. | |
builtins
|
The module that provides the built-in namespace. | |
bz2
|
Interfaces for bzip2 compression and decompression. | |
c | ||
calendar
|
Functions for working with calendars, including some emulation
of the Unix cal program. | |
cgi
|
Helpers for running Python scripts via the Common Gateway Interface. | |
cgitb
|
Configurable traceback handler for CGI scripts. | |
chunk
|
Module to read IFF chunks. | |
cmath
|
Mathematical functions for complex numbers. | |
cmd
|
Build line-oriented command interpreters. | |
code
|
Facilities to implement read-eval-print loops. | |
codecs
|
Encode and decode data and streams. | |
codeop
|
Compile (possibly incomplete) Python code. | |
- | collections
|
Container datatypes |
Abstract base classes for containers | ||
colorsys
|
Conversion functions between RGB and other color systems. | |
compileall
|
Tools for byte-compiling all Python source files in a directory tree. | |
- | concurrent
|
' |
Execute computations concurrently using threads or processes. | ||
configparser
|
Configuration file parser. | |
contextlib
|
Utilities for with-statement contexts. | |
contextvars
|
Context Variables | |
copy
|
Shallow and deep copy operations. | |
copyreg
|
Register pickle support functions. | |
cProfile
|
' | |
crypt (Unix)
|
The crypt() function used to check Unix passwords. | |
csv
|
Write and read tabular data to and from delimited files. | |
ctypes
|
A foreign function library for Python. | |
- | curses (Unix)
|
An interface to the curses library, providing portable
terminal handling. |
Constants and set-membership functions for ASCII characters. | ||
A panel stack extension that adds depth to curses windows. | ||
Emacs-like input editing in a curses window. | ||
d | ||
dataclasses
|
Generate special methods on user-defined classes. | |
datetime
|
Basic date and time types. | |
- | dbm
|
Interfaces to various Unix "database" formats. |
Portable implementation of the simple DBM interface. | ||
|
GNU's reinterpretation of dbm. | |
|
The standard "database" interface, based on ndbm. | |
decimal
|
Implementation of the General Decimal Arithmetic Specification. | |
difflib
|
Helpers for computing differences between objects. | |
dis
|
Disassembler for Python bytecode. | |
- | distutils
|
Support for building and installing Python modules into an
existing Python installation. |
Utility functions for creating archive files (tarballs, zip files, ...) | ||
' | ||
Abstract CCompiler class | ||
Provides the abstract base class :class:`~distutils.cmd.Command`. This class
is subclassed by the modules in the distutils.command subpackage. | ||
Contains one module for each standard Distutils command. | ||
Build a binary installer for a package | ||
Build a "dumb" installer - a simple archive of files | ||
Build a binary distribution as a Windows MSI file | ||
Abstract base class for packagers | ||
Build a binary distribution as a Redhat RPM and SRPM | ||
Build a Windows installer | ||
Build all files of a package | ||
Build any C libraries in a package | ||
Build any extensions in a package | ||
Build the .py/.pyc files of a package | ||
Build the scripts of a package | ||
Check the meta-data of a package | ||
Clean a package build area | ||
Perform package configuration | ||
Install a package | ||
Install data files from a package | ||
Install C/C++ header files from a package | ||
Install library files from a package | ||
Install script files from a package | ||
Register a module with the Python Package Index | ||
Build a source distribution | ||
The core Distutils functionality | ||
' | ||
Provides the debug flag for distutils | ||
Utility functions for simple dependency checking | ||
Utility functions for operating on directories and directory trees | ||
Provides the Distribution class, which represents the module distribution being
built/installed/distributed | ||
Provides standard distutils exceptions | ||
Provides the Extension class, used to describe C/C++ extension modules in setup
scripts | ||
Additional getopt functionality | ||
Utility functions for operating on single files | ||
The FileList class, used for poking about the file system and
building lists of files. | ||
A simple logging mechanism, :pep:`282`-style | ||
Microsoft Compiler | ||
Provides the spawn() function | ||
Low-level access to configuration information of the Python interpreter. | ||
Provides the TextFile class, a simple interface to text files | ||
UNIX C Compiler | ||
Miscellaneous other utility functions | ||
Implements classes that represent module version numbers. | ||
doctest
|
Test pieces of code within docstrings. | |
e | ||
- | email
|
Package supporting the parsing, manipulating, and generating
email messages. |
Character Sets | ||
Storing and Retrieving Content from MIME Parts | ||
Encoders for email message payloads. | ||
The exception classes used by the email package. | ||
Generate flat text email messages from a message structure. | ||
Representing non-ASCII headers | ||
Automatic Parsing of headers based on the field name | ||
Iterate over a message object tree. | ||
The base class representing email messages. | ||
Build MIME messages. | ||
Parse flat text email messages to produce a message object structure. | ||
Controlling the parsing and generating of messages | ||
Miscellaneous email package utilities. | ||
- | encodings
|
' |
Internationalized Domain Names implementation | ||
Windows ANSI codepage | ||
UTF-8 codec with BOM signature | ||
ensurepip
|
Bootstrapping the "pip" installer into an existing Python
installation or virtual environment. | |
enum
|
Implementation of an enumeration class. | |
errno
|
Standard errno system symbols. | |
f | ||
faulthandler
|
Dump the Python traceback. | |
fcntl (Unix)
|
The fcntl() and ioctl() system calls. | |
filecmp
|
Compare files efficiently. | |
fileinput
|
Loop over standard input or a list of files. | |
fnmatch
|
Unix shell style filename pattern matching. | |
formatter
|
已移除:
Generic output formatter and device interface. | |
fractions
|
Rational numbers. | |
ftplib
|
FTP protocol client (requires sockets). | |
functools
|
Higher-order functions and operations on callable objects. | |
g | ||
gc
|
Interface to the cycle-detecting garbage collector. | |
getopt
|
Portable parser for command line options; support both short and
long option names. | |
getpass
|
Portable reading of passwords and retrieval of the userid. | |
gettext
|
Multilingual internationalization services. | |
glob
|
Unix shell style pathname pattern expansion. | |
graphlib
|
Functionality to operate with graph-like structures | |
grp (Unix)
|
The group database (getgrnam() and friends). | |
gzip
|
Interfaces for gzip compression and decompression using file objects. | |
h | ||
hashlib
|
Secure hash and message digest algorithms. | |
heapq
|
Heap queue algorithm (a.k.a. priority queue). | |
hmac
|
Keyed-Hashing for Message Authentication (HMAC) implementation | |
- | html
|
Helpers for manipulating HTML. |
Definitions of HTML general entities. | ||
A simple parser that can handle HTML and XHTML. | ||
- | http
|
HTTP status codes and messages |
HTTP and HTTPS protocol client (requires sockets). | ||
Classes for automatic handling of HTTP cookies. | ||
Support for HTTP state management (cookies). | ||
HTTP server and request handlers. | ||
i | ||
imaplib
|
IMAP4 protocol client (requires sockets). | |
imghdr
|
Determine the type of image contained in a file or byte stream. | |
imp
|
已移除:
Access the implementation of the import statement. | |
- | importlib
|
The implementation of the import machinery. |
Abstract base classes related to import | ||
Importers and path hooks | ||
Package resource reading, opening, and access | ||
Utility code for importers | ||
inspect
|
Extract information and source code from live objects. | |
io
|
Core tools for working with streams. | |
ipaddress
|
IPv4/IPv6 manipulation library. | |
itertools
|
Functions creating iterators for efficient looping. | |
j | ||
- | json
|
Encode and decode the JSON format. |
A command line to validate and pretty-print JSON. | ||
k | ||
keyword
|
Test whether a string is a keyword in Python. | |
l | ||
lib2to3
|
The 2to3 library | |
linecache
|
Provides random access to individual lines from text files. | |
locale
|
Internationalization services. | |
- | logging
|
Flexible event logging system for applications. |
Configuration of the logging module. | ||
Handlers for the logging module. | ||
lzma
|
A Python wrapper for the liblzma compression library. | |
m | ||
mailbox
|
Manipulate mailboxes in various formats | |
mailcap
|
Mailcap file handling. | |
marshal
|
Convert Python objects to streams of bytes and back (with different
constraints). | |
math
|
Mathematical functions (sin() etc.). | |
mimetypes
|
Mapping of filename extensions to MIME types. | |
mmap
|
Interface to memory-mapped files for Unix and Windows. | |
modulefinder
|
Find modules used by a script. | |
msilib (Windows)
|
Creation of Microsoft Installer files, and CAB files. | |
msvcrt (Windows)
|
Miscellaneous useful routines from the MS VC++ runtime. | |
- | multiprocessing
|
Process-based parallelism. |
API for dealing with sockets. | ||
Dumb wrapper around threading. | ||
Share data between process with shared objects. | ||
Create pools of processes. | ||
Provides shared memory for direct access across processes. | ||
Allocate ctypes objects from shared memory. | ||
n | ||
netrc
|
Loading of .netrc files. | |
nis (Unix)
|
Interface to Sun's NIS (Yellow Pages) library. | |
nntplib
|
NNTP protocol client (requires sockets). | |
numbers
|
Numeric abstract base classes (Complex, Real, Integral, etc.). | |
o | ||
operator
|
Functions corresponding to the standard operators. | |
optparse
|
已移除:
Command-line option parsing library. | |
- | os
|
Miscellaneous operating system interfaces. |
Operations on pathnames. | ||
ossaudiodev (Linux, FreeBSD)
|
Access to OSS-compatible audio devices. | |
p | ||
parser
|
Access parse trees for Python source code. | |
pathlib
|
Object-oriented filesystem paths | |
pdb
|
The Python debugger for interactive interpreters. | |
pickle
|
Convert Python objects to streams of bytes and back. | |
pickletools
|
Contains extensive comments about the pickle protocols and
pickle-machine opcodes, as well as some useful functions. | |
pipes (Unix)
|
A Python interface to Unix shell pipelines. | |
pkgutil
|
Utilities for the import system. | |
platform
|
Retrieves as much platform identifying data as possible. | |
plistlib
|
Generate and parse Apple plist files. | |
poplib
|
POP3 protocol client (requires sockets). | |
posix (Unix)
|
The most common POSIX system calls (normally used via module os). | |
pprint
|
Data pretty printer. | |
profile
|
Python source profiler. | |
pstats
|
Statistics object for use with the profiler. | |
pty (Linux)
|
Pseudo-Terminal Handling for Linux. | |
pwd (Unix)
|
The password database (getpwnam() and friends). | |
py_compile
|
Generate byte-code files from Python source files. | |
pyclbr
|
Supports information extraction for a Python module browser. | |
pydoc
|
Documentation generator and online help system. | |
q | ||
queue
|
A synchronized queue class. | |
quopri
|
Encode and decode files using the MIME quoted-printable encoding. | |
r | ||
random
|
Generate pseudo-random numbers with various common distributions. | |
re
|
Regular expression operations. | |
readline (Unix)
|
GNU readline support for Python. | |
reprlib
|
Alternate repr() implementation with size limits. | |
resource (Unix)
|
An interface to provide resource usage information on the current process. | |
rlcompleter
|
Python identifier completion, suitable for the GNU readline library. | |
runpy
|
Locate and run Python modules without importing them first. | |
s | ||
sched
|
General purpose event scheduler. | |
secrets
|
Generate secure random numbers for managing secrets. | |
select
|
Wait for I/O completion on multiple streams. | |
selectors
|
High-level I/O multiplexing. | |
shelve
|
Python object persistence. | |
shlex
|
Simple lexical analysis for Unix shell-like languages. | |
shutil
|
High-level file operations, including copying. | |
signal
|
Set handlers for asynchronous events. | |
site
|
Module responsible for site-specific configuration. | |
smtpd
|
A SMTP server implementation in Python. | |
smtplib
|
SMTP protocol client (requires sockets). | |
sndhdr
|
Determine type of a sound file. | |
socket
|
Low-level networking interface. | |
socketserver
|
A framework for network servers. | |
spwd (Unix)
|
The shadow password database (getspnam() and friends). | |
sqlite3
|
A DB-API 2.0 implementation using SQLite 3.x. | |
ssl
|
TLS/SSL wrapper for socket objects | |
stat
|
Utilities for interpreting the results of os.stat(),
os.lstat() and os.fstat(). | |
statistics
|
Mathematical statistics functions | |
string
|
Common string operations. | |
stringprep
|
String preparation, as per RFC 3453 | |
struct
|
Interpret bytes as packed binary data. | |
subprocess
|
Subprocess management. | |
sunau
|
Provide an interface to the Sun AU sound format. | |
symbol
|
Constants representing internal nodes of the parse tree. | |
symtable
|
Interface to the compiler's internal symbol tables. | |
sys
|
Access system-specific parameters and functions. | |
sysconfig
|
Python's configuration information | |
syslog (Unix)
|
An interface to the Unix syslog library routines. | |
t | ||
tabnanny
|
Tool for detecting white space related problems in Python
source files in a directory tree. | |
tarfile
|
Read and write tar-format archive files. | |
telnetlib
|
Telnet client class. | |
tempfile
|
Generate temporary files and directories. | |
termios (Unix)
|
POSIX style tty control. | |
- | test
|
Regression tests package containing the testing suite for Python. |
Support for Python's regression test suite. | ||
Support tools for testing correct bytecode generation. | ||
Support for Python's script execution tests. | ||
Support for socket tests. | ||
textwrap
|
Text wrapping and filling | |
threading
|
Thread-based parallelism. | |
time
|
Time access and conversions. | |
timeit
|
Measure the execution time of small code snippets. | |
- | tkinter
|
Interface to Tcl/Tk for graphical user interfaces |
|
Color choosing dialog | |
|
Tkinter base class for dialogs | |
|
Tkinter drag-and-drop interface | |
|
Dialog classes for file selection | |
|
Tkinter font-wrapping class | |
|
Various types of alert dialogs | |
|
Text widget with a vertical scroll bar. | |
|
Simple dialog windows | |
Tk Extension Widgets for Tkinter | ||
Tk themed widget set | ||
token
|
Constants representing terminal nodes of the parse tree. | |
tokenize
|
Lexical scanner for Python source code. | |
trace
|
Trace or track Python statement execution. | |
traceback
|
Print or retrieve a stack traceback. | |
tracemalloc
|
Trace memory allocations. | |
tty (Unix)
|
Utility functions that perform common terminal control operations. | |
turtle
|
An educational framework for simple graphics applications | |
turtledemo
|
A viewer for example turtle scripts | |
types
|
Names for built-in types. | |
typing
|
Support for type hints (see :pep:`484`). | |
u | ||
unicodedata
|
Access the Unicode Database. | |
- | unittest
|
Unit testing framework for Python. |
Mock object library. | ||
- | urllib
|
' |
Exception classes raised by urllib.request. | ||
Parse URLs into or assemble them from components. | ||
Extensible library for opening URLs. | ||
Response classes used by urllib. | ||
Load a robots.txt file and answer questions about
fetchability of other URLs. | ||
uu
|
Encode and decode files in uuencode format. | |
uuid
|
UUID objects (universally unique identifiers) according to RFC 4122 | |
v | ||
venv
|
Creation of virtual environments. | |
w | ||
warnings
|
Issue warning messages and control their disposition. | |
wave
|
Provide an interface to the WAV sound format. | |
weakref
|
Support for weak references and weak dictionaries. | |
webbrowser
|
Easy-to-use controller for Web browsers. | |
winreg (Windows)
|
Routines and objects for manipulating the Windows registry. | |
winsound (Windows)
|
Access to the sound-playing machinery for Windows. | |
- | wsgiref
|
WSGI Utilities and Reference Implementation. |
WSGI server/gateway base classes. | ||
WSGI response header tools. | ||
A simple WSGI HTTP server. | ||
WSGI environment utilities. | ||
WSGI conformance checker. | ||
x | ||
xdrlib
|
Encoders and decoders for the External Data Representation (XDR). | |
- | xml
|
Package containing XML processing modules |
Document Object Model API for Python. | ||
Minimal Document Object Model (DOM) implementation. | ||
Support for building partial DOM trees from SAX events. | ||
Implementation of the ElementTree API. | ||
An interface to the Expat non-validating XML parser. | ||
' | ||
' | ||
Package containing SAX2 base classes and convenience functions. | ||
Base classes for SAX event handlers. | ||
Convenience functions and classes for use with SAX. | ||
Interface which SAX-compliant XML parsers must implement. | ||
- | xmlrpc
|
' |
XML-RPC client access. | ||
Basic XML-RPC server implementations. | ||
z | ||
zipapp
|
Manage executable Python zip archives | |
zipfile
|
Read and write ZIP-format archive files. | |
zipimport
|
Support for importing Python modules from ZIP archives. | |
zlib
|
Low-level interface to compression and decompression routines
compatible with gzip. | |
zoneinfo
|
IANA time zone support |