Files
hustoj/web/python-docs/library/index.html
2025-03-09 17:10:56 +08:00

636 lines
71 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh_CN">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Python 标准库 &#8212; Python 3.8.20 文档</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/translations.js"></script>
<script src="../_static/sidebar.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="在 Python 3.8.20 文档 中搜索"
href="../_static/opensearch.xml"/>
<link rel="author" title="关于这些文档" href="../about.html" />
<link rel="index" title="索引" href="../genindex.html" />
<link rel="search" title="搜索" href="../search.html" />
<link rel="copyright" title="版权所有" href="../copyright.html" />
<link rel="next" title="概述" href="intro.html" />
<link rel="prev" title="10. 完整的语法规范" href="../reference/grammar.html" />
<link rel="canonical" href="https://docs.python.org/3/library/index.html" />
<style>
@media only screen {
table.full-width-table {
width: 100%;
}
}
</style>
<link rel="shortcut icon" type="image/png" href="../_static/py.svg" />
<script type="text/javascript" src="../_static/copybutton.js"></script>
<script type="text/javascript" src="../_static/menu.js"></script>
</head>
<body>
<div class="mobile-nav">
<input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"
aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu" />
<label for="menuToggler" class="toggler__label">
<span></span>
</label>
<nav class="nav-content" role="navigation">
<a href="https://www.python.org/" class="nav-logo">
<img src="../_static/py.svg" alt="Logo"/>
</a>
<div class="version_switcher_placeholder"></div>
<form role="search" class="search" action="../search.html" method="get">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">
<path fill-rule="nonzero"
d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" fill="#444"></path>
</svg>
<input type="text" name="q" aria-label="快速搜索"/>
<input type="submit" value="转向"/>
</form>
</nav>
<div class="menu-wrapper">
<nav class="menu" role="navigation" aria-label="main navigation">
<div class="language_switcher_placeholder"></div>
<h4>上一个主题</h4>
<p class="topless"><a href="../reference/grammar.html"
title="上一章"><span class="section-number">10. </span>完整的语法规范</a></p>
<h4>下一个主题</h4>
<p class="topless"><a href="intro.html"
title="下一章">概述</a></p>
<div role="note" aria-label="source link">
<h3>本页</h3>
<ul class="this-page-menu">
<li><a href="../bugs.html">报告 Bug</a></li>
<li>
<a href="https://github.com/python/cpython/blob/3.8/Doc/library/index.rst"
rel="nofollow">显示源代码
</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
<div id="outdated-warning" style="padding: .5em; text-align: center; background-color: #FFBABA; color: #6A0E0E;">
这个文档所针对的是一个已不再受支持的 Python 旧版本。
你应当升级版本,并阅读
<a href="/3/library/index.html"> Python 当前稳定版本的文档</a>.
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>导航</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="总目录"
accesskey="I">索引</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python 模块索引"
>模块</a> |</li>
<li class="right" >
<a href="intro.html" title="概述"
accesskey="N">下一页</a> |</li>
<li class="right" >
<a href="../reference/grammar.html" title="10. 完整的语法规范"
accesskey="P">上一页</a> |</li>
<li><img src="../_static/py.svg" alt="python logo" style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="https://www.python.org/">Python</a> &#187;</li>
<li class="switchers">
<div class="language_switcher_placeholder"></div>
<div class="version_switcher_placeholder"></div>
</li>
<li>
</li>
<li id="cpython-language-and-version">
<a href="../index.html">3.8.20 Documentation</a> &#187;
</li>
<li class="right">
<div class="inline-search" role="search">
<form class="inline-search" action="../search.html" method="get">
<input placeholder="快速搜索" aria-label="快速搜索" type="text" name="q" />
<input type="submit" value="转向" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
|
</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="the-python-standard-library">
<span id="library-index"></span><h1>Python 标准库<a class="headerlink" href="#the-python-standard-library" title="永久链接至标题"></a></h1>
<p><a class="reference internal" href="../reference/index.html#reference-index"><span class="std std-ref">Python语言参考</span></a> 描述了 Python 语言的具体语法和语义,这份库参考则介绍了与 Python 一同发行的标准库。它还描述了通常包含在 Python 发行版中的一些可选组件。</p>
<p>Python 标准库非常庞大,所提供的组件涉及范围十分广泛,正如以下内容目录所显示的。这个库包含了多个内置模块 (以 C 编写)Python 程序员必须依靠它们来实现系统级功能,例如文件 I/O此外还有大量以 Python 编写的模块,提供了日常编程中许多问题的标准解决方案。其中有些模块经过专门设计,通过将特定平台功能抽象化为平台中立的 API 来鼓励和加强 Python 程序的可移植性。</p>
<p>Windows 版本的 Python 安装程序通常包含整个标准库,往往还包含许多额外组件。对于类 Unix 操作系统Python 通常会分成一系列的软件包,因此可能需要使用操作系统所提供的包管理工具来获取部分或全部可选组件。</p>
<p>在这个标准库以外还存在成千上万并且不断增加的其他组件 (从单独的程序、模块、软件包直到完整的应用开发框架),访问 <a class="reference external" href="https://pypi.org">Python 包索引</a> 即可获取这些第三方包。</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">概述</a><ul>
<li class="toctree-l2"><a class="reference internal" href="intro.html#notes-on-availability">可用性注释</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="functions.html">内置函数</a></li>
<li class="toctree-l1"><a class="reference internal" href="constants.html">内置常量</a><ul>
<li class="toctree-l2"><a class="reference internal" href="constants.html#constants-added-by-the-site-module"><code class="xref py py-mod docutils literal notranslate"><span class="pre">site</span></code> 模块添加的常量</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="stdtypes.html">内置类型</a><ul>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#truth-value-testing">逻辑值检测</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#boolean-operations-and-or-not">布尔运算 --- <code class="xref std std-keyword docutils literal notranslate"><span class="pre">and</span></code>, <code class="xref std std-keyword docutils literal notranslate"><span class="pre">or</span></code>, <code class="xref std std-keyword docutils literal notranslate"><span class="pre">not</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#comparisons">比较运算</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#numeric-types-int-float-complex">数字类型 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">complex</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#iterator-types">迭代器类型</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#sequence-types-list-tuple-range">序列类型 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">range</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#text-sequence-type-str">文本序列类型 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#binary-sequence-types-bytes-bytearray-memoryview">二进制序列类型 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">bytes</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">bytearray</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">memoryview</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#set-types-set-frozenset">集合类型 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">set</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">frozenset</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#mapping-types-dict">映射类型 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#context-manager-types">上下文管理器类型</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#other-built-in-types">其他内置类型</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#special-attributes">特殊属性</a></li>
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#integer-string-conversion-length-limitation">整数字符串转换长度限制</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="exceptions.html">内置异常</a><ul>
<li class="toctree-l2"><a class="reference internal" href="exceptions.html#base-classes">基类</a></li>
<li class="toctree-l2"><a class="reference internal" href="exceptions.html#concrete-exceptions">具体异常</a></li>
<li class="toctree-l2"><a class="reference internal" href="exceptions.html#warnings">警告</a></li>
<li class="toctree-l2"><a class="reference internal" href="exceptions.html#exception-hierarchy">异常层次结构</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="text.html">文本处理服务</a><ul>
<li class="toctree-l2"><a class="reference internal" href="string.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">string</span></code> --- 常见的字符串操作</a></li>
<li class="toctree-l2"><a class="reference internal" href="re.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">re</span></code> --- 正则表达式操作</a></li>
<li class="toctree-l2"><a class="reference internal" href="difflib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">difflib</span></code> --- 计算差异的辅助工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="textwrap.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">textwrap</span></code> --- 文本自动换行与填充</a></li>
<li class="toctree-l2"><a class="reference internal" href="unicodedata.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">unicodedata</span></code> --- Unicode 数据库</a></li>
<li class="toctree-l2"><a class="reference internal" href="stringprep.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">stringprep</span></code> --- 因特网字符串预备</a></li>
<li class="toctree-l2"><a class="reference internal" href="readline.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">readline</span></code> --- GNU readline 接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="rlcompleter.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">rlcompleter</span></code> --- GNU readline 的补全函数</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="binary.html">二进制数据服务</a><ul>
<li class="toctree-l2"><a class="reference internal" href="struct.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">struct</span></code> --- 将字节串解读为打包的二进制数据</a></li>
<li class="toctree-l2"><a class="reference internal" href="codecs.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">codecs</span></code> --- 编解码器注册和相关基类</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="datatypes.html">数据类型</a><ul>
<li class="toctree-l2"><a class="reference internal" href="datetime.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">datetime</span></code> --- 基本日期和时间类型</a></li>
<li class="toctree-l2"><a class="reference internal" href="calendar.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">calendar</span></code> --- 日历相关函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="collections.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">collections</span></code> --- 容器数据类型</a></li>
<li class="toctree-l2"><a class="reference internal" href="collections.abc.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">collections.abc</span></code> --- 容器的抽象基类</a></li>
<li class="toctree-l2"><a class="reference internal" href="heapq.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">heapq</span></code> --- 堆队列算法</a></li>
<li class="toctree-l2"><a class="reference internal" href="bisect.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">bisect</span></code> --- 数组二分查找算法</a></li>
<li class="toctree-l2"><a class="reference internal" href="array.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">array</span></code> --- 高效的数字数组</a></li>
<li class="toctree-l2"><a class="reference internal" href="weakref.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">weakref</span></code> --- 弱引用</a></li>
<li class="toctree-l2"><a class="reference internal" href="types.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">types</span></code> --- 动态类型创建和内置类型名称</a></li>
<li class="toctree-l2"><a class="reference internal" href="copy.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">copy</span></code> --- 浅层 (shallow) 和深层 (deep) 复制操作</a></li>
<li class="toctree-l2"><a class="reference internal" href="pprint.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pprint</span></code> --- 数据美化输出</a></li>
<li class="toctree-l2"><a class="reference internal" href="reprlib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">reprlib</span></code> --- 另一种 <code class="xref py py-func docutils literal notranslate"><span class="pre">repr()</span></code> 实现</a></li>
<li class="toctree-l2"><a class="reference internal" href="enum.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">enum</span></code> --- 对枚举的支持</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="numeric.html">数字和数学模块</a><ul>
<li class="toctree-l2"><a class="reference internal" href="numbers.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numbers</span></code> --- 数字的抽象基类</a></li>
<li class="toctree-l2"><a class="reference internal" href="math.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">math</span></code> --- 数学函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="cmath.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cmath</span></code> --- 关于复数的数学函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="decimal.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">decimal</span></code> --- 十进制定点和浮点运算</a></li>
<li class="toctree-l2"><a class="reference internal" href="fractions.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">fractions</span></code> --- 分数</a></li>
<li class="toctree-l2"><a class="reference internal" href="random.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">random</span></code> --- 生成伪随机数</a></li>
<li class="toctree-l2"><a class="reference internal" href="statistics.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">statistics</span></code> --- 数学统计函数</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="functional.html">函数式编程模块</a><ul>
<li class="toctree-l2"><a class="reference internal" href="itertools.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">itertools</span></code> --- 为高效循环而创建迭代器的函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="functools.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">functools</span></code> --- 高阶函数和可调用对象上的操作</a></li>
<li class="toctree-l2"><a class="reference internal" href="operator.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">operator</span></code> --- 标准运算符替代函数</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="filesys.html">文件和目录访问</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pathlib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pathlib</span></code> --- 面向对象的文件系统路径</a></li>
<li class="toctree-l2"><a class="reference internal" href="os.path.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">os.path</span></code> --- 常用路径操作</a></li>
<li class="toctree-l2"><a class="reference internal" href="fileinput.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">fileinput</span></code> --- 迭代来自多个输入流的行</a></li>
<li class="toctree-l2"><a class="reference internal" href="stat.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">stat</span></code> --- 解析 <code class="xref py py-func docutils literal notranslate"><span class="pre">stat()</span></code> 结果</a></li>
<li class="toctree-l2"><a class="reference internal" href="filecmp.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">filecmp</span></code> --- 文件及目录的比较</a></li>
<li class="toctree-l2"><a class="reference internal" href="tempfile.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tempfile</span></code> --- 生成临时文件和目录</a></li>
<li class="toctree-l2"><a class="reference internal" href="glob.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">glob</span></code> --- Unix 风格路径名模式扩展</a></li>
<li class="toctree-l2"><a class="reference internal" href="fnmatch.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">fnmatch</span></code> --- Unix 文件名模式匹配</a></li>
<li class="toctree-l2"><a class="reference internal" href="linecache.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">linecache</span></code> --- 随机读写文本行</a></li>
<li class="toctree-l2"><a class="reference internal" href="shutil.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">shutil</span></code> --- 高阶文件操作</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="persistence.html">数据持久化</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pickle.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pickle</span></code> --- Python 对象序列化</a></li>
<li class="toctree-l2"><a class="reference internal" href="copyreg.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">copyreg</span></code> --- 注册配合 <code class="xref py py-mod docutils literal notranslate"><span class="pre">pickle</span></code> 模块使用的函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="shelve.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">shelve</span></code> --- Python 对象持久化</a></li>
<li class="toctree-l2"><a class="reference internal" href="marshal.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">marshal</span></code> --- 内部 Python 对象序列化</a></li>
<li class="toctree-l2"><a class="reference internal" href="dbm.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dbm</span></code> --- Unix &quot;数据库&quot; 接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="sqlite3.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sqlite3</span></code> --- SQLite 数据库 DB-API 2.0 接口模块</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="archiving.html">数据压缩和存档</a><ul>
<li class="toctree-l2"><a class="reference internal" href="zlib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">zlib</span></code> --- 与 <strong class="program">gzip</strong> 兼容的压缩</a></li>
<li class="toctree-l2"><a class="reference internal" href="gzip.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gzip</span></code> --- 对 <strong class="program">gzip</strong> 格式的支持</a></li>
<li class="toctree-l2"><a class="reference internal" href="bz2.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">bz2</span></code> --- 对 <strong class="program">bzip2</strong> 压缩算法的支持</a></li>
<li class="toctree-l2"><a class="reference internal" href="lzma.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">lzma</span></code> --- 用 LZMA 算法压缩</a></li>
<li class="toctree-l2"><a class="reference internal" href="zipfile.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">zipfile</span></code> --- 使用ZIP存档</a></li>
<li class="toctree-l2"><a class="reference internal" href="tarfile.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tarfile</span></code> --- 读写tar归档文件</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="fileformats.html">文件格式</a><ul>
<li class="toctree-l2"><a class="reference internal" href="csv.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">csv</span></code> --- CSV 文件读写</a></li>
<li class="toctree-l2"><a class="reference internal" href="configparser.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">configparser</span></code> --- 配置文件解析器</a></li>
<li class="toctree-l2"><a class="reference internal" href="netrc.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">netrc</span></code> --- netrc 文件处理</a></li>
<li class="toctree-l2"><a class="reference internal" href="xdrlib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xdrlib</span></code> --- 编码与解码 XDR 数据</a></li>
<li class="toctree-l2"><a class="reference internal" href="plistlib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">plistlib</span></code> --- 生成与解析 Mac OS X <code class="docutils literal notranslate"><span class="pre">.plist</span></code> 文件</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="crypto.html">加密服务</a><ul>
<li class="toctree-l2"><a class="reference internal" href="hashlib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">hashlib</span></code> --- 安全哈希与消息摘要</a></li>
<li class="toctree-l2"><a class="reference internal" href="hmac.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">hmac</span></code> --- 基于密钥的消息验证</a></li>
<li class="toctree-l2"><a class="reference internal" href="secrets.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">secrets</span></code> --- 生成管理密码的安全随机数</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="allos.html">通用操作系统服务</a><ul>
<li class="toctree-l2"><a class="reference internal" href="os.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">os</span></code> --- 多种操作系统接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="io.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">io</span></code> --- 处理流的核心工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="time.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">time</span></code> --- 时间的访问和转换</a></li>
<li class="toctree-l2"><a class="reference internal" href="argparse.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">argparse</span></code> --- 命令行选项、参数和子命令解析器</a></li>
<li class="toctree-l2"><a class="reference internal" href="getopt.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">getopt</span></code> --- C 风格的命令行选项解析器</a></li>
<li class="toctree-l2"><a class="reference internal" href="logging.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">logging</span></code> --- Python 的日志记录工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="logging.config.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">logging.config</span></code> --- 日志记录配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="logging.handlers.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">logging.handlers</span></code> --- 日志处理程序</a></li>
<li class="toctree-l2"><a class="reference internal" href="getpass.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">getpass</span></code> --- 便携式密码输入工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="curses.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">curses</span></code> --- 终端字符单元显示的处理</a></li>
<li class="toctree-l2"><a class="reference internal" href="curses.html#module-curses.textpad"><code class="xref py py-mod docutils literal notranslate"><span class="pre">curses.textpad</span></code> --- 用于 curses 程序的文本输入控件</a></li>
<li class="toctree-l2"><a class="reference internal" href="curses.ascii.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">curses.ascii</span></code> --- 用于 ASCII 字符的工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="curses.panel.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">curses.panel</span></code> --- curses 的 panel 栈扩展</a></li>
<li class="toctree-l2"><a class="reference internal" href="platform.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">platform</span></code> --- 获取底层平台的标识数据</a></li>
<li class="toctree-l2"><a class="reference internal" href="errno.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">errno</span></code> --- 标准 errno 系统符号</a></li>
<li class="toctree-l2"><a class="reference internal" href="ctypes.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ctypes</span></code> --- Python 的外部函数库</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="concurrency.html">并发执行</a><ul>
<li class="toctree-l2"><a class="reference internal" href="threading.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">threading</span></code> --- 基于线程的并行</a></li>
<li class="toctree-l2"><a class="reference internal" href="multiprocessing.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">multiprocessing</span></code> --- 基于进程的并行</a></li>
<li class="toctree-l2"><a class="reference internal" href="multiprocessing.shared_memory.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">multiprocessing.shared_memory</span></code> --- 可从进程直接访问的共享内存</a></li>
<li class="toctree-l2"><a class="reference internal" href="concurrent.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">concurrent</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="concurrent.futures.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">concurrent.futures</span></code> --- 启动并行任务</a></li>
<li class="toctree-l2"><a class="reference internal" href="subprocess.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">subprocess</span></code> --- 子进程管理</a></li>
<li class="toctree-l2"><a class="reference internal" href="sched.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sched</span></code> --- 事件调度器</a></li>
<li class="toctree-l2"><a class="reference internal" href="queue.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">queue</span></code> --- 一个同步的队列类</a></li>
<li class="toctree-l2"><a class="reference internal" href="contextvars.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">contextvars</span></code> --- 上下文变量</a></li>
<li class="toctree-l2"><a class="reference internal" href="_thread.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">_thread</span></code> --- 底层多线程 API</a></li>
<li class="toctree-l2"><a class="reference internal" href="_dummy_thread.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">_dummy_thread</span></code> --- <code class="xref py py-mod docutils literal notranslate"><span class="pre">_thread</span></code> 的替代模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="dummy_threading.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dummy_threading</span></code> --- 可直接替代 <code class="xref py py-mod docutils literal notranslate"><span class="pre">threading</span></code> 模块。</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="ipc.html">网络和进程间通信</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncio.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">asyncio</span></code> --- 异步 I/O</a></li>
<li class="toctree-l2"><a class="reference internal" href="socket.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">socket</span></code> --- 底层网络接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssl.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ssl</span></code> --- 套接字对象的 TLS/SSL 包装器</a></li>
<li class="toctree-l2"><a class="reference internal" href="select.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">select</span></code> --- 等待 I/O 完成</a></li>
<li class="toctree-l2"><a class="reference internal" href="selectors.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">selectors</span></code> --- 高级 I/O 复用库</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncore.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">asyncore</span></code> --- 异步套接字处理器</a></li>
<li class="toctree-l2"><a class="reference internal" href="asynchat.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">asynchat</span></code> --- 异步套接字指令/响应处理程序</a></li>
<li class="toctree-l2"><a class="reference internal" href="signal.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">signal</span></code> --- 设置异步事件处理程序</a></li>
<li class="toctree-l2"><a class="reference internal" href="mmap.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mmap</span></code> --- 内存映射文件支持</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="netdata.html">互联网数据处理</a><ul>
<li class="toctree-l2"><a class="reference internal" href="email.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">email</span></code> --- 电子邮件与 MIME 处理包</a></li>
<li class="toctree-l2"><a class="reference internal" href="json.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">json</span></code> --- JSON 编码和解码器</a></li>
<li class="toctree-l2"><a class="reference internal" href="mailcap.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mailcap</span></code> --- Mailcap 文件处理</a></li>
<li class="toctree-l2"><a class="reference internal" href="mailbox.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mailbox</span></code> --- 操作多种格式的邮箱</a></li>
<li class="toctree-l2"><a class="reference internal" href="mimetypes.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mimetypes</span></code> --- 映射文件夹到 MIME 类型</a></li>
<li class="toctree-l2"><a class="reference internal" href="base64.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">base64</span></code> --- Base16, Base32, Base64, Base85 数据编码</a></li>
<li class="toctree-l2"><a class="reference internal" href="binhex.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">binhex</span></code> --- 对binhex4文件进行编码和解码</a></li>
<li class="toctree-l2"><a class="reference internal" href="binascii.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">binascii</span></code> --- 二进制和 ASCII 码互转</a></li>
<li class="toctree-l2"><a class="reference internal" href="quopri.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quopri</span></code> --- 编码与解码经过 MIME 转码的可打印数据</a></li>
<li class="toctree-l2"><a class="reference internal" href="uu.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">uu</span></code> --- 对 uuencode 文件进行编码与解码</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="markup.html">结构化标记处理工具</a><ul>
<li class="toctree-l2"><a class="reference internal" href="html.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">html</span></code> --- 超文本标记语言支持</a></li>
<li class="toctree-l2"><a class="reference internal" href="html.parser.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">html.parser</span></code> --- 简单的 HTML 和 XHTML 解析器</a></li>
<li class="toctree-l2"><a class="reference internal" href="html.entities.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">html.entities</span></code> --- HTML 一般实体的定义</a></li>
<li class="toctree-l2"><a class="reference internal" href="xml.html">XML处理模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="xml.etree.elementtree.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.etree.ElementTree</span></code> --- ElementTree XML API</a></li>
<li class="toctree-l2"><a class="reference internal" href="xml.dom.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.dom</span></code> --- 文档对象模型 API</a></li>
<li class="toctree-l2"><a class="reference internal" href="xml.dom.minidom.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.dom.minidom</span></code> --- 最小化的 DOM 实现</a></li>
<li class="toctree-l2"><a class="reference internal" href="xml.dom.pulldom.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.dom.pulldom</span></code> --- 支持构建部分 DOM 树</a></li>
<li class="toctree-l2"><a class="reference internal" href="xml.sax.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax</span></code> --- 支持 SAX2 解析器</a></li>
<li class="toctree-l2"><a class="reference internal" href="xml.sax.handler.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.handler</span></code> --- SAX 处理器的基类</a></li>
<li class="toctree-l2"><a class="reference internal" href="xml.sax.utils.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.saxutils</span></code> --- SAX 工具集</a></li>
<li class="toctree-l2"><a class="reference internal" href="xml.sax.reader.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.xmlreader</span></code> --- 用于 XML 解析器的接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyexpat.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.parsers.expat</span></code> --- 使用 Expat 的快速 XML 解析</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="internet.html">互联网协议和支持</a><ul>
<li class="toctree-l2"><a class="reference internal" href="webbrowser.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">webbrowser</span></code> --- 方便的Web浏览器控制器</a></li>
<li class="toctree-l2"><a class="reference internal" href="cgi.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cgi</span></code> --- 通用网关接口支持</a></li>
<li class="toctree-l2"><a class="reference internal" href="cgitb.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cgitb</span></code> --- 用于 CGI 脚本的回溯管理器</a></li>
<li class="toctree-l2"><a class="reference internal" href="wsgiref.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">wsgiref</span></code> --- WSGI 工具和参考实现</a></li>
<li class="toctree-l2"><a class="reference internal" href="urllib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">urllib</span></code> --- URL 处理模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="urllib.request.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">urllib.request</span></code> --- 用于打开 URL 的可扩展库</a></li>
<li class="toctree-l2"><a class="reference internal" href="urllib.request.html#module-urllib.response"><code class="xref py py-mod docutils literal notranslate"><span class="pre">urllib.response</span></code> --- urllib 使用的 Response 类</a></li>
<li class="toctree-l2"><a class="reference internal" href="urllib.parse.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">urllib.parse</span></code> 用于解析 URL</a></li>
<li class="toctree-l2"><a class="reference internal" href="urllib.error.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">urllib.error</span></code> --- urllib.request 引发的异常类</a></li>
<li class="toctree-l2"><a class="reference internal" href="urllib.robotparser.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">urllib.robotparser</span></code> --- robots.txt 语法分析程序</a></li>
<li class="toctree-l2"><a class="reference internal" href="http.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">http</span></code> --- HTTP 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="http.client.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">http.client</span></code> --- HTTP 协议客户端</a></li>
<li class="toctree-l2"><a class="reference internal" href="ftplib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ftplib</span></code> --- FTP 协议客户端</a></li>
<li class="toctree-l2"><a class="reference internal" href="poplib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">poplib</span></code> --- POP3 协议客户端</a></li>
<li class="toctree-l2"><a class="reference internal" href="imaplib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">imaplib</span></code> --- IMAP4 协议客户端</a></li>
<li class="toctree-l2"><a class="reference internal" href="nntplib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">nntplib</span></code> --- NNTP 协议客户端</a></li>
<li class="toctree-l2"><a class="reference internal" href="smtplib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">smtplib</span></code> --- SMTP 协议客户端</a></li>
<li class="toctree-l2"><a class="reference internal" href="smtpd.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">smtpd</span></code> --- SMTP 服务器</a></li>
<li class="toctree-l2"><a class="reference internal" href="telnetlib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">telnetlib</span></code> -- Telnet 客户端</a></li>
<li class="toctree-l2"><a class="reference internal" href="uuid.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">uuid</span></code> --- <strong>RFC 4122</strong> 定义的UUID对象</a></li>
<li class="toctree-l2"><a class="reference internal" href="socketserver.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">socketserver</span></code> --- 用于网络服务器的框架</a></li>
<li class="toctree-l2"><a class="reference internal" href="http.server.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">http.server</span></code> --- HTTP 服务器</a></li>
<li class="toctree-l2"><a class="reference internal" href="http.cookies.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">http.cookies</span></code> --- HTTP状态管理</a></li>
<li class="toctree-l2"><a class="reference internal" href="http.cookiejar.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">http.cookiejar</span></code> —— HTTP 客户端的 Cookie 处理</a></li>
<li class="toctree-l2"><a class="reference internal" href="xmlrpc.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xmlrpc</span></code> --- XMLRPC 服务端与客户端模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="xmlrpc.client.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xmlrpc.client</span></code> --- XML-RPC 客户端访问</a></li>
<li class="toctree-l2"><a class="reference internal" href="xmlrpc.server.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xmlrpc.server</span></code> --- 基本 XML-RPC 服务器</a></li>
<li class="toctree-l2"><a class="reference internal" href="ipaddress.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ipaddress</span></code> --- IPv4/IPv6 操作库</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="mm.html">多媒体服务</a><ul>
<li class="toctree-l2"><a class="reference internal" href="audioop.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">audioop</span></code> --- 处理原始音频数据</a></li>
<li class="toctree-l2"><a class="reference internal" href="aifc.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">aifc</span></code> --- 读写 AIFF 和 AIFC 文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="sunau.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sunau</span></code> --- 读写 Sun AU 文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="wave.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">wave</span></code> --- 读写WAV格式文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="chunk.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">chunk</span></code> --- 读取 IFF 分块数据</a></li>
<li class="toctree-l2"><a class="reference internal" href="colorsys.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">colorsys</span></code> --- 颜色系统间的转换</a></li>
<li class="toctree-l2"><a class="reference internal" href="imghdr.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">imghdr</span></code> --- 推测图像类型</a></li>
<li class="toctree-l2"><a class="reference internal" href="sndhdr.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sndhdr</span></code> --- 推测声音文件的类型</a></li>
<li class="toctree-l2"><a class="reference internal" href="ossaudiodev.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ossaudiodev</span></code> --- 访问兼容OSS的音频设备</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="i18n.html">国际化</a><ul>
<li class="toctree-l2"><a class="reference internal" href="gettext.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gettext</span></code> --- 多语种国际化服务</a></li>
<li class="toctree-l2"><a class="reference internal" href="locale.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">locale</span></code> --- 国际化服务</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="frameworks.html">程序框架</a><ul>
<li class="toctree-l2"><a class="reference internal" href="turtle.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">turtle</span></code> --- 海龟绘图</a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cmd</span></code> --- 支持面向行的命令解释器</a></li>
<li class="toctree-l2"><a class="reference internal" href="shlex.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">shlex</span></code> —— 简单的词义分析</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="tk.html">Tk图形用户界面(GUI)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tkinter.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tkinter</span></code> —— Tcl/Tk 的 Python 接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="tkinter.ttk.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tkinter.ttk</span></code> --- Tk 风格的控件</a></li>
<li class="toctree-l2"><a class="reference internal" href="tkinter.tix.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tkinter.tix</span></code> --- TK扩展包</a></li>
<li class="toctree-l2"><a class="reference internal" href="tkinter.scrolledtext.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tkinter.scrolledtext</span></code> --- 滚动文字控件</a></li>
<li class="toctree-l2"><a class="reference internal" href="idle.html">IDLE</a></li>
<li class="toctree-l2"><a class="reference internal" href="othergui.html">其他图形用户界面GUI</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="development.html">开发工具</a><ul>
<li class="toctree-l2"><a class="reference internal" href="typing.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">typing</span></code> —— 对类型提示的支持</a></li>
<li class="toctree-l2"><a class="reference internal" href="pydoc.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pydoc</span></code> --- 文档生成器和在线帮助系统</a></li>
<li class="toctree-l2"><a class="reference internal" href="doctest.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">doctest</span></code> --- 测试交互式的 Python 示例</a></li>
<li class="toctree-l2"><a class="reference internal" href="unittest.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">unittest</span></code> --- 单元测试框架</a></li>
<li class="toctree-l2"><a class="reference internal" href="unittest.mock.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">unittest.mock</span></code> --- 模拟对象库</a></li>
<li class="toctree-l2"><a class="reference internal" href="unittest.mock-examples.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">unittest.mock</span></code> --- 上手指南</a></li>
<li class="toctree-l2"><a class="reference internal" href="2to3.html">2to3 - 自动将 Python 2 代码转为 Python 3 代码</a></li>
<li class="toctree-l2"><a class="reference internal" href="test.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">test</span></code> --- Python 回归测试包</a></li>
<li class="toctree-l2"><a class="reference internal" href="test.html#module-test.support"><code class="xref py py-mod docutils literal notranslate"><span class="pre">test.support</span></code> --- 针对 Python 测试套件的工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="test.html#module-test.support.script_helper"><code class="xref py py-mod docutils literal notranslate"><span class="pre">test.support.script_helper</span></code> --- 用于 Python 执行测试工具</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="debug.html">调试和分析</a><ul>
<li class="toctree-l2"><a class="reference internal" href="audit_events.html">审计事件表</a></li>
<li class="toctree-l2"><a class="reference internal" href="bdb.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">bdb</span></code> --- 调试器框架</a></li>
<li class="toctree-l2"><a class="reference internal" href="faulthandler.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">faulthandler</span></code> —— 转储 Python 的跟踪信息</a></li>
<li class="toctree-l2"><a class="reference internal" href="pdb.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pdb</span></code> --- Python 的调试器</a></li>
<li class="toctree-l2"><a class="reference internal" href="profile.html">Python Profilers 分析器</a></li>
<li class="toctree-l2"><a class="reference internal" href="timeit.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">timeit</span></code> --- 测量小代码片段的执行时间</a></li>
<li class="toctree-l2"><a class="reference internal" href="trace.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">trace</span></code> --- 跟踪Python语句的执行</a></li>
<li class="toctree-l2"><a class="reference internal" href="tracemalloc.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tracemalloc</span></code> --- 跟踪内存分配</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="distribution.html">软件打包和分发</a><ul>
<li class="toctree-l2"><a class="reference internal" href="distutils.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">distutils</span></code> 构建和安装 Python 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="ensurepip.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code> --- 引导 <code class="docutils literal notranslate"><span class="pre">pip</span></code> 安装器</a></li>
<li class="toctree-l2"><a class="reference internal" href="venv.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">venv</span></code> --- 创建虚拟环境</a></li>
<li class="toctree-l2"><a class="reference internal" href="zipapp.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">zipapp</span></code> —— 管理可执行的 Python zip 打包文件</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python.html">Python 运行时服务</a><ul>
<li class="toctree-l2"><a class="reference internal" href="sys.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sys</span></code> --- 系统相关的形参和函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="sysconfig.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sysconfig</span></code> —— 提供对 Python 配置信息的访问支持</a></li>
<li class="toctree-l2"><a class="reference internal" href="builtins.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">builtins</span></code> --- 内建对象</a></li>
<li class="toctree-l2"><a class="reference internal" href="__main__.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">__main__</span></code> --- 顶层脚本环境</a></li>
<li class="toctree-l2"><a class="reference internal" href="warnings.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">warnings</span></code> ——控制警告信息</a></li>
<li class="toctree-l2"><a class="reference internal" href="dataclasses.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dataclasses</span></code> --- 数据类</a></li>
<li class="toctree-l2"><a class="reference internal" href="contextlib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">contextlib</span></code> --- 为 <code class="xref std std-keyword docutils literal notranslate"><span class="pre">with</span></code>语句上下文提供的工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="abc.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">abc</span></code> --- 抽象基类</a></li>
<li class="toctree-l2"><a class="reference internal" href="atexit.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">atexit</span></code> --- 退出处理器</a></li>
<li class="toctree-l2"><a class="reference internal" href="traceback.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">traceback</span></code> —— 打印或读取栈回溯信息</a></li>
<li class="toctree-l2"><a class="reference internal" href="__future__.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">__future__</span></code> --- Future 语句定义</a></li>
<li class="toctree-l2"><a class="reference internal" href="gc.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gc</span></code> --- 垃圾回收器接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="inspect.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">inspect</span></code> --- 检查对象</a></li>
<li class="toctree-l2"><a class="reference internal" href="site.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">site</span></code> —— 指定域的配置钩子</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="custominterp.html">自定义 Python 解释器</a><ul>
<li class="toctree-l2"><a class="reference internal" href="code.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">code</span></code> --- 解释器基类</a></li>
<li class="toctree-l2"><a class="reference internal" href="codeop.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">codeop</span></code> --- 编译Python代码</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">导入模块</a><ul>
<li class="toctree-l2"><a class="reference internal" href="zipimport.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">zipimport</span></code> --- 从 Zip 存档中导入模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="pkgutil.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pkgutil</span></code> --- 包扩展工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="modulefinder.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">modulefinder</span></code> --- 查找脚本使用的模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="runpy.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">runpy</span></code> ——查找并执行 Python 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="importlib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">importlib</span></code> --- <code class="xref std std-keyword docutils literal notranslate"><span class="pre">import</span></code> 的实现</a></li>
<li class="toctree-l2"><a class="reference internal" href="importlib.metadata.html">使用 <code class="xref py py-mod docutils literal notranslate"><span class="pre">importlib.metadata</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="language.html">Python 语言服务</a><ul>
<li class="toctree-l2"><a class="reference internal" href="parser.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">parser</span></code> --- 访问 Python 解析树</a></li>
<li class="toctree-l2"><a class="reference internal" href="ast.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ast</span></code> --- 抽象语法树</a></li>
<li class="toctree-l2"><a class="reference internal" href="symtable.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">symtable</span></code> ——访问编译器的符号表</a></li>
<li class="toctree-l2"><a class="reference internal" href="symbol.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">symbol</span></code> --- 与 Python 解析树一起使用的常量</a></li>
<li class="toctree-l2"><a class="reference internal" href="token.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">token</span></code> --- 与Python解析树一起使用的常量</a></li>
<li class="toctree-l2"><a class="reference internal" href="keyword.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">keyword</span></code> --- 检验Python关键字</a></li>
<li class="toctree-l2"><a class="reference internal" href="tokenize.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tokenize</span></code> --- 对 Python 代码使用的标记解析器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tabnanny.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tabnanny</span></code> --- 模糊缩进检测</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyclbr.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pyclbr</span></code> --- Python 模块浏览器支持</a></li>
<li class="toctree-l2"><a class="reference internal" href="py_compile.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">py_compile</span></code> --- 编译 Python 源文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="compileall.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">compileall</span></code> --- 字节编译 Python 库</a></li>
<li class="toctree-l2"><a class="reference internal" href="dis.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dis</span></code> --- Python 字节码反汇编器</a></li>
<li class="toctree-l2"><a class="reference internal" href="pickletools.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pickletools</span></code> --- pickle 开发者工具集</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="misc.html">杂项服务</a><ul>
<li class="toctree-l2"><a class="reference internal" href="formatter.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">formatter</span></code> --- 通用格式化输出</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="windows.html">Windows系统相关模块</a><ul>
<li class="toctree-l2"><a class="reference internal" href="msilib.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code> --- 读写 Microsoft Installer 文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="msvcrt.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msvcrt</span></code> --- 来自 MS VC++ 运行时的有用例程</a></li>
<li class="toctree-l2"><a class="reference internal" href="winreg.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">winreg</span></code> --- 访问 Windows 注册表</a></li>
<li class="toctree-l2"><a class="reference internal" href="winsound.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">winsound</span></code> —— Windows 系统的声音播放接口</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="unix.html">Unix 专有服务</a><ul>
<li class="toctree-l2"><a class="reference internal" href="posix.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">posix</span></code> --- 最常见的 POSIX 系统调用</a></li>
<li class="toctree-l2"><a class="reference internal" href="pwd.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pwd</span></code> --- 用户密码数据库</a></li>
<li class="toctree-l2"><a class="reference internal" href="spwd.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">spwd</span></code> —— shadow 密码库</a></li>
<li class="toctree-l2"><a class="reference internal" href="grp.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">grp</span></code> --- 组数据库</a></li>
<li class="toctree-l2"><a class="reference internal" href="crypt.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">crypt</span></code> —— 检查 Unix 口令的函数</a></li>
<li class="toctree-l2"><a class="reference internal" href="termios.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">termios</span></code> --- POSIX 风格的 tty 控制</a></li>
<li class="toctree-l2"><a class="reference internal" href="tty.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tty</span></code> --- 终端控制功能</a></li>
<li class="toctree-l2"><a class="reference internal" href="pty.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pty</span></code> --- 伪终端工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="fcntl.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">fcntl</span></code> —— 系统调用 <code class="docutils literal notranslate"><span class="pre">fcntl</span></code><code class="docutils literal notranslate"><span class="pre">ioctl</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="pipes.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pipes</span></code> --- 终端管道接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="resource.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">resource</span></code> --- 资源使用信息</a></li>
<li class="toctree-l2"><a class="reference internal" href="nis.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">nis</span></code> --- Sun 的 NIS (黄页) 接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="syslog.html">Unix syslog 库例程</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="superseded.html">被取代的模块</a><ul>
<li class="toctree-l2"><a class="reference internal" href="optparse.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">optparse</span></code> --- 命令行选项的解析器</a></li>
<li class="toctree-l2"><a class="reference internal" href="imp.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">imp</span></code> --- 访问 <span class="xref std std-ref">import</span> 内部对象</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="undoc.html">未创建文档的模块</a><ul>
<li class="toctree-l2"><a class="reference internal" href="undoc.html#platform-specific-modules">平台特定模块</a></li>
</ul>
</li>
</ul>
</div>
</section>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>上一个主题</h4>
<p class="topless"><a href="../reference/grammar.html"
title="上一章"><span class="section-number">10. </span>完整的语法规范</a></p>
<h4>下一个主题</h4>
<p class="topless"><a href="intro.html"
title="下一章">概述</a></p>
<div role="note" aria-label="source link">
<h3>本页</h3>
<ul class="this-page-menu">
<li><a href="../bugs.html">报告 Bug</a></li>
<li>
<a href="https://github.com/python/cpython/blob/3.8/Doc/library/index.rst"
rel="nofollow">显示源代码
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>导航</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="总目录"
>索引</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python 模块索引"
>模块</a> |</li>
<li class="right" >
<a href="intro.html" title="概述"
>下一页</a> |</li>
<li class="right" >
<a href="../reference/grammar.html" title="10. 完整的语法规范"
>上一页</a> |</li>
<li><img src="../_static/py.svg" alt="python logo" style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="https://www.python.org/">Python</a> &#187;</li>
<li class="switchers">
<div class="language_switcher_placeholder"></div>
<div class="version_switcher_placeholder"></div>
</li>
<li>
</li>
<li id="cpython-language-and-version">
<a href="../index.html">3.8.20 Documentation</a> &#187;
</li>
<li class="right">
<div class="inline-search" role="search">
<form class="inline-search" action="../search.html" method="get">
<input placeholder="快速搜索" aria-label="快速搜索" type="text" name="q" />
<input type="submit" value="转向" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
|
</li>
</ul>
</div>
<div class="footer">
&copy; <a href="../copyright.html">版权所有</a> 2001-2024, Python Software Foundation.
<br />
This page is licensed under the Python Software Foundation License Version 2.
<br />
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
<br />
<br />
The Python Software Foundation is a non-profit corporation.
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
<br />
最后更新于 12月 09, 2024.
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
<br />
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 2.4.4.
</div>
</body>
</html>