📄 index.htm
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Python Library Reference</title>
<META NAME="description" CONTENT="Python Library Reference">
<META NAME="keywords" CONTENT="lib">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="STYLESHEET" href="lib.css" tppabs="http://www.python.org/doc/current/lib/lib.css">
<LINK REL="next" href="front.html" tppabs="http://www.python.org/doc/current/lib/front.html">
</head>
<body>
<DIV CLASS="navigation"><table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><img src="blank.gif" tppabs="http://www.python.org/doc/current/icons/blank.gif" border="0" height="32"
alt="" width="32"></td>
<td><A HREF="javascript:if(confirm('http://www.python.org/doc/current/index.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.python.org/doc/current/index.html'" tppabs="http://www.python.org/doc/current/index.html"><img src="up.gif" tppabs="http://www.python.org/doc/current/icons/up.gif" border="0" height="32"
alt="Up One Level" width="32"></A></td>
<td><A href="front.html" tppabs="http://www.python.org/doc/current/lib/front.html"><img src="next.gif" tppabs="http://www.python.org/doc/current/icons/next.gif" border="0" height="32"
alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td><A href="contents.html" tppabs="http://www.python.org/doc/current/lib/contents.html"><img src="contents.gif" tppabs="http://www.python.org/doc/current/icons/contents.gif" border="0" height="32"
alt="Contents" width="32"></A></td>
<td><a href="modindex.html" tppabs="http://www.python.org/doc/current/lib/modindex.html" title="Module Index"><img src="modules.gif" tppabs="http://www.python.org/doc/current/icons/modules.gif" border="0" height="32"
alt="Module Index" width="32"></a></td>
<td><A href="genindex.html" tppabs="http://www.python.org/doc/current/lib/genindex.html"><img src="index.gif" tppabs="http://www.python.org/doc/current/icons/index.gif" border="0" height="32"
alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Up:</b> <a class="sectref" HREF="javascript:if(confirm('http://www.python.org/doc/current/index.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.python.org/doc/current/index.html'" tppabs="http://www.python.org/doc/current/index.html">Document Index</A>
<b class="navlabel">Next:</b> <a class="sectref" href="front.html" tppabs="http://www.python.org/doc/current/lib/front.html">Front Matter</A>
<br><hr></DIV>
<!--End of Navigation Panel-->
<P>
<div class="titlepage">
<table border="0" width="100%"><tr>
<td class="titlegraphic" width="30%"><img width="121" height="110"
src="labslogo.gif" tppabs="http://www.python.org/doc/current/icons/labslogo.gif"></td>
<td>
<h1>Python Library Reference</h1>
<p><b><font size='+2'>Guido van Rossum
<BR>
Fred L. Drake, Jr., editor</font></b></p>
<p>
BeOpen PythonLabs
<BR>
E-mail: <span class="email">python-docs@python.org</span>
</p>
<p><strong>October 16, 2000</strong><br><strong>Release 2.0</strong></p>
<p></td></tr>
</table>
</div>
<P>
<p><hr>
<!--Table of Child-Links-->
<UL>
<LI><A NAME="tex2html67"
href="front.html" tppabs="http://www.python.org/doc/current/lib/front.html">Front Matter</A>
<LI><A NAME="tex2html68"
href="contents.html" tppabs="http://www.python.org/doc/current/lib/contents.html">Contents</A>
<LI><A NAME="tex2html69"
href="intro.html" tppabs="http://www.python.org/doc/current/lib/intro.html">1. Introduction</A>
<LI><A NAME="tex2html70"
href="builtin.html" tppabs="http://www.python.org/doc/current/lib/builtin.html">2. Built-in Types, Exceptions and Functions</A>
<UL>
<LI><A NAME="tex2html71"
href="types.html" tppabs="http://www.python.org/doc/current/lib/types.html">2.1 Built-in Types </A>
<UL>
<LI><A NAME="tex2html72"
href="truth.html" tppabs="http://www.python.org/doc/current/lib/truth.html">2.1.1 Truth Value Testing </A>
<LI><A NAME="tex2html73"
href="boolean.html" tppabs="http://www.python.org/doc/current/lib/boolean.html">2.1.2 Boolean Operations </A>
<LI><A NAME="tex2html74"
href="comparisons.html" tppabs="http://www.python.org/doc/current/lib/comparisons.html">2.1.3 Comparisons </A>
<LI><A NAME="tex2html75"
href="typesnumeric.html" tppabs="http://www.python.org/doc/current/lib/typesnumeric.html">2.1.4 Numeric Types </A>
<LI><A NAME="tex2html76"
href="typesseq.html" tppabs="http://www.python.org/doc/current/lib/typesseq.html">2.1.5 Sequence Types </A>
<LI><A NAME="tex2html77"
href="typesmapping.html" tppabs="http://www.python.org/doc/current/lib/typesmapping.html">2.1.6 Mapping Types </A>
<LI><A NAME="tex2html78"
href="typesother.html" tppabs="http://www.python.org/doc/current/lib/typesother.html">2.1.7 Other Built-in Types </A>
<LI><A NAME="tex2html79"
href="specialattrs.html" tppabs="http://www.python.org/doc/current/lib/specialattrs.html">2.1.8 Special Attributes </A>
</UL>
<LI><A NAME="tex2html80"
href="module-exceptions.html" tppabs="http://www.python.org/doc/current/lib/module-exceptions.html">2.2 Built-in Exceptions</A>
<LI><A NAME="tex2html81"
href="built-in-funcs.html" tppabs="http://www.python.org/doc/current/lib/built-in-funcs.html">2.3 Built-in Functions </A>
</UL>
<LI><A NAME="tex2html82"
href="python.html" tppabs="http://www.python.org/doc/current/lib/python.html">3. Python Runtime Services
</A>
<UL>
<LI><A NAME="tex2html83"
href="module-sys.html" tppabs="http://www.python.org/doc/current/lib/module-sys.html">3.1 <tt class="module">sys</tt> --
System-specific parameters and functions</A>
<LI><A NAME="tex2html84"
href="module-gc.html" tppabs="http://www.python.org/doc/current/lib/module-gc.html">3.2 <tt class="module">gc</tt> --
Garbage Collector interface</A>
<LI><A NAME="tex2html85"
href="module-atexit.html" tppabs="http://www.python.org/doc/current/lib/module-atexit.html">3.3 <tt class="module">atexit</tt> --
Exit handlers</A>
<UL>
<LI><A NAME="tex2html86"
href="atexit-example.html" tppabs="http://www.python.org/doc/current/lib/atexit-example.html">3.3.1 <tt class="module">atexit</tt> Example </A>
</UL>
<LI><A NAME="tex2html87"
href="module-types.html" tppabs="http://www.python.org/doc/current/lib/module-types.html">3.4 <tt class="module">types</tt> --
Names for all built-in types</A>
<LI><A NAME="tex2html88"
href="module-UserDict.html" tppabs="http://www.python.org/doc/current/lib/module-UserDict.html">3.5 <tt class="module">UserDict</tt> --
Class wrapper for dictionary objects</A>
<LI><A NAME="tex2html89"
href="module-UserList.html" tppabs="http://www.python.org/doc/current/lib/module-UserList.html">3.6 <tt class="module">UserList</tt> --
Class wrapper for list objects</A>
<LI><A NAME="tex2html90"
href="module-UserString.html" tppabs="http://www.python.org/doc/current/lib/module-UserString.html">3.7 <tt class="module">UserString</tt> --
Class wrapper for string objects</A>
<LI><A NAME="tex2html91"
href="module-operator.html" tppabs="http://www.python.org/doc/current/lib/module-operator.html">3.8 <tt class="module">operator</tt> --
Standard operators as functions.</A>
<LI><A NAME="tex2html92"
href="module-traceback.html" tppabs="http://www.python.org/doc/current/lib/module-traceback.html">3.9 <tt class="module">traceback</tt> --
Print or retrieve a stack traceback</A>
<UL>
<LI><A NAME="tex2html93"
href="traceback-example.html" tppabs="http://www.python.org/doc/current/lib/traceback-example.html">3.9.1 Traceback Example </A>
</UL>
<LI><A NAME="tex2html94"
href="module-linecache.html" tppabs="http://www.python.org/doc/current/lib/module-linecache.html">3.10 <tt class="module">linecache</tt> --
Random access to text lines</A>
<LI><A NAME="tex2html95"
href="module-pickle.html" tppabs="http://www.python.org/doc/current/lib/module-pickle.html">3.11 <tt class="module">pickle</tt> --
Python object serialization</A>
<UL>
<LI><A NAME="tex2html96"
href="pickle-example.html" tppabs="http://www.python.org/doc/current/lib/pickle-example.html">3.11.1 Example </A>
</UL>
<LI><A NAME="tex2html97"
href="module-cPickle.html" tppabs="http://www.python.org/doc/current/lib/module-cPickle.html">3.12 <tt class="module">cPickle</tt> --
Alternate implementation of <tt class="module">pickle</tt></A>
<LI><A NAME="tex2html98"
href="module-copyreg.html" tppabs="http://www.python.org/doc/current/lib/module-copyreg.html">3.13 <tt class="module">copy_reg</tt> --
Register <tt class="module">pickle</tt> support functions</A>
<LI><A NAME="tex2html99"
href="module-shelve.html" tppabs="http://www.python.org/doc/current/lib/module-shelve.html">3.14 <tt class="module">shelve</tt> --
Python object persistence</A>
<LI><A NAME="tex2html100"
href="module-copy.html" tppabs="http://www.python.org/doc/current/lib/module-copy.html">3.15 <tt class="module">copy</tt> --
Shallow and deep copy operations</A>
<LI><A NAME="tex2html101"
href="module-marshal.html" tppabs="http://www.python.org/doc/current/lib/module-marshal.html">3.16 <tt class="module">marshal</tt> --
Alternate Python object serialization</A>
<LI><A NAME="tex2html102"
href="module-imp.html" tppabs="http://www.python.org/doc/current/lib/module-imp.html">3.17 <tt class="module">imp</tt> --
Access the <tt class="keyword">import</tt> internals</A>
<UL>
<LI><A NAME="tex2html103"
href="examples-imp.html" tppabs="http://www.python.org/doc/current/lib/examples-imp.html">3.17.1 Examples</A>
</UL>
<LI><A NAME="tex2html104"
href="module-code.html" tppabs="http://www.python.org/doc/current/lib/module-code.html">3.18 <tt class="module">code</tt> --
Interpreter base classes</A>
<UL>
<LI><A NAME="tex2html105"
href="interpreter-objects.html" tppabs="http://www.python.org/doc/current/lib/interpreter-objects.html">3.18.1 Interactive Interpreter Objects
</A>
<LI><A NAME="tex2html106"
href="console-objects.html" tppabs="http://www.python.org/doc/current/lib/console-objects.html">3.18.2 Interactive Console Objects
</A>
</UL>
<LI><A NAME="tex2html107"
href="module-codeop.html" tppabs="http://www.python.org/doc/current/lib/module-codeop.html">3.19 <tt class="module">codeop</tt> --
Compile Python code</A>
<LI><A NAME="tex2html108"
href="module-pprint.html" tppabs="http://www.python.org/doc/current/lib/module-pprint.html">3.20 <tt class="module">pprint</tt> --
Data pretty printer</A>
<UL>
<LI><A NAME="tex2html109"
href="PrettyPrinter_Objects.html" tppabs="http://www.python.org/doc/current/lib/PrettyPrinter_Objects.html">3.20.1 PrettyPrinter Objects</A>
</UL>
<LI><A NAME="tex2html110"
href="module-repr.html" tppabs="http://www.python.org/doc/current/lib/module-repr.html">3.21 <tt class="module">repr</tt> --
Alternate <tt class="function">repr()</tt> implementation</A>
<UL>
<LI><A NAME="tex2html111"
href="Repr-objects.html" tppabs="http://www.python.org/doc/current/lib/Repr-objects.html">3.21.1 Repr Objects </A>
<LI><A NAME="tex2html112"
href="subclassing-reprs.html" tppabs="http://www.python.org/doc/current/lib/subclassing-reprs.html">3.21.2 Subclassing Repr Objects </A>
</UL>
<LI><A NAME="tex2html113"
href="module-new.html" tppabs="http://www.python.org/doc/current/lib/module-new.html">3.22 <tt class="module">new</tt> --
Creation of runtime internal objects</A>
<LI><A NAME="tex2html114"
href="module-site.html" tppabs="http://www.python.org/doc/current/lib/module-site.html">3.23 <tt class="module">site</tt> --
Site-specific configuration hook</A>
<LI><A NAME="tex2html115"
href="module-user.html" tppabs="http://www.python.org/doc/current/lib/module-user.html">3.24 <tt class="module">user</tt> --
User-specific configuration hook</A>
<LI><A NAME="tex2html116"
href="module-builtin.html" tppabs="http://www.python.org/doc/current/lib/module-builtin.html">3.25 <tt class="module">__builtin__</tt> --
Built-in functions</A>
<LI><A NAME="tex2html117"
href="module-main.html" tppabs="http://www.python.org/doc/current/lib/module-main.html">3.26 <tt class="module">__main__</tt> --
Top-level script environment</A>
</UL>
<LI><A NAME="tex2html118"
href="strings.html" tppabs="http://www.python.org/doc/current/lib/strings.html">4. String Services</A>
<UL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -