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 top-level code is run. Covers command-lineinterfaces, import-time behavior, and ``__name__ == '__main__'``.
_threadLow-level threading API.
_tkinterA binary module that contains the low-level interface to Tcl/Tk.
 
a
abcAbstract base classes according to :pep:`3119`.
aifc已棄用:Removed in 3.13.
argparseCommand-line option and argument parsing library.
arraySpace efficient arrays of uniformly typed numeric values.
astAbstract Syntax Tree classes and manipulation.
asynchat已棄用:Removed in 3.12.
asyncioAsynchronous I/O.
asyncore已棄用:Removed in 3.12.
atexitRegister and execute cleanup functions.
audioop已棄用:Removed in 3.13.
 
b
base64RFC 4648: Base16, Base32, Base64 Data Encodings;Base85 and Ascii85
bdbDebugger framework.
binasciiTools for converting between binary and various ASCII-encoded binaryrepresentations.
bisectArray bisection algorithms for binary searching.
builtinsThe module that provides the built-in namespace.
bz2Interfaces for bzip2 compression and decompression.
 
c
calendarFunctions for working with calendars, including some emulationof the Unix cal program.
cgi已棄用:Removed in 3.13.
cgitb已棄用:Removed in 3.13.
chunk已棄用:Removed in 3.13.
cmathMathematical functions for complex numbers.
cmdBuild line-oriented command interpreters.
codeFacilities to implement read-eval-print loops.
codecsEncode and decode data and streams.
codeopCompile (possibly incomplete) Python code.
-collectionsContainer datatypes
   collections.abcAbstract base classes for containers
colorsysConversion functions between RGB and other color systems.
compileallTools for byte-compiling all Python source files in a directory tree.
-concurrent
   concurrent.futuresExecute computations concurrently using threads or processes.
configparserConfiguration file parser.
contextlibUtilities for with-statement contexts.
contextvarsContext Variables
copyShallow and deep copy operations.
copyregRegister pickle support functions.
cProfile
crypt已棄用:Removed in 3.13.
csvWrite and read tabular data to and from delimited files.
ctypesA foreign function library for Python.
-curses(Unix)An interface to the curses library, providing portableterminal handling.
   curses.asciiConstants and set-membership functions for ASCII characters.
   curses.panelA panel stack extension that adds depth to curses windows.
   curses.textpadEmacs-like input editing in a curses window.
 
d
dataclassesGenerate special methods on user-defined classes.
datetimeBasic date and time types.
-dbmInterfaces to various Unix "database" formats.
   dbm.dumbPortable implementation of the simple DBM interface.
   dbm.gnu(Unix)GNU database manager
   dbm.ndbm(Unix)The New Database Manager
   dbm.sqlite3(All)SQLite backend for dbm
decimalImplementation of the General Decimal Arithmetic Specification.
difflibHelpers for computing differences between objects.
disDisassembler for Python bytecode.
distutils已棄用:Removed in 3.12.
doctestTest pieces of code within docstrings.
 
e
-emailPackage supporting the parsing, manipulating, and generatingemail messages.
   email.charsetCharacter Sets
   email.contentmanagerStoring and Retrieving Content from MIME Parts
   email.encodersEncoders for email message payloads.
   email.errorsThe exception classes used by the email package.
   email.generatorGenerate flat text email messages from a message structure.
   email.headerRepresenting non-ASCII headers
   email.headerregistryAutomatic Parsing of headers based on the field name
   email.iteratorsIterate over a message object tree.
   email.messageThe base class representing email messages.
   email.mimeBuild MIME messages.
   email.mime.application
   email.mime.audio
   email.mime.base
   email.mime.image
   email.mime.message
   email.mime.multipart
   email.mime.nonmultipart
   email.mime.text
   email.parserParse flat text email messages to produce a message object structure.
   email.policyControlling the parsing and generating of messages
   email.utilsMiscellaneous email package utilities.
-encodings
   encodings.idnaInternationalized Domain Names implementation
   encodings.mbcsWindows ANSI codepage
   encodings.utf_8_sigUTF-8 codec with BOM signature
ensurepipBootstrapping the "pip" installer into an existing Pythoninstallation or virtual environment.
enumImplementation of an enumeration class.
errnoStandard errno system symbols.
 
f
faulthandlerDump the Python traceback.
fcntl(Unix)The fcntl() and ioctl() system calls.
filecmpCompare files efficiently.
fileinputLoop over standard input or a list of files.
fnmatchUnix shell style filename pattern matching.
fractionsRational numbers.
ftplibFTP protocol client (requires sockets).
functoolsHigher-order functions and operations on callable objects.
 
g
gcInterface to the cycle-detecting garbage collector.
getoptPortable parser for command line options; support both short andlong option names.
getpassPortable reading of passwords and retrieval of the userid.
gettextMultilingual internationalization services.
globUnix shell style pathname pattern expansion.
graphlibFunctionality to operate with graph-like structures
grp(Unix)The group database (getgrnam() and friends).
gzipInterfaces for gzip compression and decompression using file objects.
 
h
hashlibSecure hash and message digest algorithms.
heapqHeap queue algorithm (a.k.a. priority queue).
hmacKeyed-Hashing for Message Authentication (HMAC) implementation
-htmlHelpers for manipulating HTML.
   html.entitiesDefinitions of HTML general entities.
   html.parserA simple parser that can handle HTML and XHTML.
-httpHTTP status codes and messages
   http.clientHTTP and HTTPS protocol client (requires sockets).
   http.cookiejarClasses for automatic handling of HTTP cookies.
   http.cookiesSupport for HTTP state management (cookies).
   http.serverHTTP server and request handlers.
 
i
idlelibImplementation package for the IDLE shell/editor.
imaplibIMAP4 protocol client (requires sockets).
imghdr已棄用:Removed in 3.13.
imp已棄用:Removed in 3.12.
-importlibThe implementation of the import machinery.
   importlib.abcAbstract base classes related to import
   importlib.machineryImporters and path hooks
   importlib.metadataAccessing package metadata
   importlib.resourcesPackage resource reading, opening, and access
   importlib.resources.abcAbstract base classes for resources
   importlib.utilUtility code for importers
inspectExtract information and source code from live objects.
ioCore tools for working with streams.
ipaddressIPv4/IPv6 manipulation library.
itertoolsFunctions creating iterators for efficient looping.
 
j
-jsonEncode and decode the JSON format.
   json.toolA command line to validate and pretty-print JSON.
 
k
keywordTest whether a string is a keyword in Python.
 
l
linecacheProvides random access to individual lines from text files.
localeInternationalization services.
-loggingFlexible event logging system for applications.
   logging.configConfiguration of the logging module.
   logging.handlersHandlers for the logging module.
lzmaA Python wrapper for the liblzma compression library.
 
m
mailboxManipulate mailboxes in various formats
mailcap已棄用:Removed in 3.13.
marshalConvert Python objects to streams of bytes and back (with differentconstraints).
mathMathematical functions (sin() etc.).
mimetypesMapping of filename extensions to MIME types.
mmapInterface to memory-mapped files for Unix and Windows.
modulefinderFind modules used by a script.
msilib已棄用:Removed in 3.13.
msvcrt(Windows)Miscellaneous useful routines from the MS VC++ runtime.
-multiprocessingProcess-based parallelism.
   multiprocessing.connectionAPI for dealing with sockets.
   multiprocessing.dummyDumb wrapper around threading.
   multiprocessing.managersShare data between process with shared objects.
   multiprocessing.poolCreate pools of processes.
   multiprocessing.shared_memoryProvides shared memory for direct access across processes.
   multiprocessing.sharedctypesAllocate ctypes objects from shared memory.
 
n
netrcLoading of .netrc files.
nis已棄用:Removed in 3.13.
nntplib已棄用:Removed in 3.13.
numbersNumeric abstract base classes (Complex, Real, Integral, etc.).
 
o
operatorFunctions corresponding to the standard operators.
optparseCommand-line option parsing library.
-osMiscellaneous operating system interfaces.
   os.pathOperations on pathnames.
ossaudiodev已棄用:Removed in 3.13.
 
p
pathlibObject-oriented filesystem paths
pdbThe Python debugger for interactive interpreters.
pickleConvert Python objects to streams of bytes and back.
pickletoolsContains extensive comments about the pickle protocols andpickle-machine opcodes, as well as some useful functions.
pipes已棄用:Removed in 3.13.
pkgutilUtilities for the import system.
platformRetrieves as much platform identifying data as possible.
plistlibGenerate and parse Apple plist files.
poplibPOP3 protocol client (requires sockets).
posix(Unix)The most common POSIX system calls (normally used via module os).
pprintData pretty printer.
profilePython source profiler.
pstatsStatistics object for use with the profiler.
pty(Unix)Pseudo-Terminal Handling for Unix.
pwd(Unix)The password database (getpwnam() and friends).
py_compileGenerate byte-code files from Python source files.
pyclbrSupports information extraction for a Python module browser.
pydocDocumentation generator and online help system.
 
q
queueA synchronized queue class.
quopriEncode and decode files using the MIME quoted-printable encoding.
 
r
randomGenerate pseudo-random numbers with various common distributions.
reRegular expression operations.
readline(Unix)GNU readline support for Python.
reprlibAlternate repr() implementation with size limits.
resource(Unix)An interface to provide resource usage information on the current process.
rlcompleterPython identifier completion, suitable for the GNU readline library.
runpyLocate and run Python modules without importing them first.
 
s
schedGeneral purpose event scheduler.
secretsGenerate secure random numbers for managing secrets.
selectWait for I/O completion on multiple streams.
selectorsHigh-level I/O multiplexing.
shelvePython object persistence.
shlexSimple lexical analysis for Unix shell-like languages.
shutilHigh-level file operations, including copying.
signalSet handlers for asynchronous events.
siteModule responsible for site-specific configuration.
sitecustomize
smtpd已棄用:Removed in 3.12.
smtplibSMTP protocol client (requires sockets).
sndhdr已棄用:Removed in 3.13.
socketLow-level networking interface.
socketserverA framework for network servers.
spwd已棄用:Removed in 3.13.
sqlite3A DB-API 2.0 implementation using SQLite 3.x.
sslTLS/SSL wrapper for socket objects
statUtilities for interpreting the results of os.stat(),os.lstat() and os.fstat().
statisticsMathematical statistics functions
stringCommon string operations.
stringprepString preparation, as per RFC 3453
structInterpret bytes as packed binary data.
subprocessSubprocess management.
sunau已棄用:Removed in 3.13.
symtableInterface to the compiler's internal symbol tables.
-sysAccess system-specific parameters and functions.
   sys.monitoringAccess and control event monitoring
sysconfigPython's configuration information
syslog(Unix)An interface to the Unix syslog library routines.
 
t
tabnannyTool for detecting white space related problems in Pythonsource files in a directory tree.
tarfileRead and write tar-format archive files.
telnetlib已棄用:Removed in 3.13.
tempfileGenerate temporary files and directories.
termios(Unix)POSIX style tty control.
-testRegression tests package containing the testing suite for Python.
   test.regrtestDrives the regression test suite.
   test.supportSupport for Python's regression test suite.
   test.support.bytecode_helperSupport tools for testing correct bytecode generation.
   test.support.import_helperSupport for import tests.
   test.support.os_helperSupport for os tests.
   test.support.script_helperSupport for Python's script execution tests.
   test.support.socket_helperSupport for socket tests.
   test.support.threading_helperSupport for threading tests.
   test.support.warnings_helperSupport for warnings tests.
textwrapText wrapping and filling
threadingThread-based parallelism.
timeTime access and conversions.
timeitMeasure the execution time of small code snippets.
-tkinterInterface to Tcl/Tk for graphical user interfaces
   tkinter.colorchooser(Tk)Color choosing dialog
   tkinter.commondialog(Tk)Tkinter base class for dialogs
   tkinter.dnd(Tk)Tkinter drag-and-drop interface
   tkinter.filedialog(Tk)Dialog classes for file selection
   tkinter.font(Tk)Tkinter font-wrapping class
   tkinter.messagebox(Tk)Various types of alert dialogs
   tkinter.scrolledtext(Tk)Text widget with a vertical scroll bar.
   tkinter.simpledialog(Tk)Simple dialog windows
   tkinter.ttkTk themed widget set
tokenConstants representing terminal nodes of the parse tree.
tokenizeLexical scanner for Python source code.
tomllibParse TOML files.
traceTrace or track Python statement execution.
tracebackPrint or retrieve a stack traceback.
tracemallocTrace memory allocations.
tty(Unix)Utility functions that perform common terminal control operations.
turtleAn educational framework for simple graphics applications
turtledemoA viewer for example turtle scripts
typesNames for built-in types.
typingSupport for type hints (see :pep:`484`).
 
u
unicodedataAccess the Unicode Database.
-unittestUnit testing framework for Python.
   unittest.mockMock object library.
-urllib
   urllib.errorException classes raised by urllib.request.
   urllib.parseParse URLs into or assemble them from components.
   urllib.requestExtensible library for opening URLs.
   urllib.responseResponse classes used by urllib.
   urllib.robotparserLoad a robots.txt file and answer questions aboutfetchability of other URLs.
usercustomize
uu已棄用:Removed in 3.13.
uuidUUID objects (universally unique identifiers) according to RFC 4122
 
v
venvCreation of virtual environments.
 
w
warningsIssue warning messages and control their disposition.
waveProvide an interface to the WAV sound format.
weakrefSupport for weak references and weak dictionaries.
webbrowserEasy-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.
-wsgirefWSGI Utilities and Reference Implementation.
   wsgiref.handlersWSGI server/gateway base classes.
   wsgiref.headersWSGI response header tools.
   wsgiref.simple_serverA simple WSGI HTTP server.
   wsgiref.typesWSGI types for static type checking
   wsgiref.utilWSGI environment utilities.
   wsgiref.validateWSGI conformance checker.
 
x
xdrlib已棄用:Removed in 3.13.
-xmlPackage containing XML processing modules
   xml.domDocument Object Model API for Python.
   xml.dom.minidomMinimal Document Object Model (DOM) implementation.
   xml.dom.pulldomSupport for building partial DOM trees from SAX events.
   xml.etree.ElementInclude
   xml.etree.ElementTreeImplementation of the ElementTree API.
   xml.parsers.expatAn interface to the Expat non-validating XML parser.
   xml.parsers.expat.errors
   xml.parsers.expat.model
   xml.saxPackage containing SAX2 base classes and convenience functions.
   xml.sax.handlerBase classes for SAX event handlers.
   xml.sax.saxutilsConvenience functions and classes for use with SAX.
   xml.sax.xmlreaderInterface which SAX-compliant XML parsers must implement.
-xmlrpcServer and client modules implementing XML-RPC.
   xmlrpc.clientXML-RPC client access.
   xmlrpc.serverBasic XML-RPC server implementations.
 
z
zipappManage executable Python zip archives
zipfileRead and write ZIP-format archive files.
zipimportSupport for importing Python modules from ZIP archives.
zlibLow-level interface to compression and decompression routinescompatible with gzip.
zoneinfoIANA time zone support