1 | \documentclass{manual}
|
---|
2 |
|
---|
3 | % NOTE: this file controls which chapters/sections of the library
|
---|
4 | % manual are actually printed. It is easy to customize your manual
|
---|
5 | % by commenting out sections that you're not interested in.
|
---|
6 |
|
---|
7 | \title{Python Library Reference}
|
---|
8 |
|
---|
9 | \input{boilerplate}
|
---|
10 |
|
---|
11 | \makeindex % tell \index to actually write the
|
---|
12 | % .idx file
|
---|
13 | \makemodindex % ... and the module index as well.
|
---|
14 |
|
---|
15 |
|
---|
16 | \begin{document}
|
---|
17 |
|
---|
18 | \maketitle
|
---|
19 |
|
---|
20 | \ifhtml
|
---|
21 | \chapter*{Front Matter\label{front}}
|
---|
22 | \fi
|
---|
23 |
|
---|
24 | \input{copyright}
|
---|
25 |
|
---|
26 | \begin{abstract}
|
---|
27 |
|
---|
28 | \noindent
|
---|
29 | Python is an extensible, interpreted, object-oriented programming
|
---|
30 | language. It supports a wide range of applications, from simple text
|
---|
31 | processing scripts to interactive Web browsers.
|
---|
32 |
|
---|
33 | While the \citetitle[../ref/ref.html]{Python Reference Manual}
|
---|
34 | describes the exact syntax and semantics of the language, it does not
|
---|
35 | describe the standard library that is distributed with the language,
|
---|
36 | and which greatly enhances its immediate usability. This library
|
---|
37 | contains built-in modules (written in C) that provide access to system
|
---|
38 | functionality such as file I/O that would otherwise be inaccessible to
|
---|
39 | Python programmers, as well as modules written in Python that provide
|
---|
40 | standardized solutions for many problems that occur in everyday
|
---|
41 | programming. Some of these modules are explicitly designed to
|
---|
42 | encourage and enhance the portability of Python programs.
|
---|
43 |
|
---|
44 | This library reference manual documents Python's standard library, as
|
---|
45 | well as many optional library modules (which may or may not be
|
---|
46 | available, depending on whether the underlying platform supports them
|
---|
47 | and on the configuration choices made at compile time). It also
|
---|
48 | documents the standard types of the language and its built-in
|
---|
49 | functions and exceptions, many of which are not or incompletely
|
---|
50 | documented in the Reference Manual.
|
---|
51 |
|
---|
52 | This manual assumes basic knowledge about the Python language. For an
|
---|
53 | informal introduction to Python, see the
|
---|
54 | \citetitle[../tut/tut.html]{Python Tutorial}; the
|
---|
55 | \citetitle[../ref/ref.html]{Python Reference Manual} remains the
|
---|
56 | highest authority on syntactic and semantic questions. Finally, the
|
---|
57 | manual entitled \citetitle[../ext/ext.html]{Extending and Embedding
|
---|
58 | the Python Interpreter} describes how to add new extensions to Python
|
---|
59 | and how to embed it in other applications.
|
---|
60 |
|
---|
61 | \end{abstract}
|
---|
62 |
|
---|
63 | \tableofcontents
|
---|
64 |
|
---|
65 | % Chapter title:
|
---|
66 |
|
---|
67 | \input{libintro} % Introduction
|
---|
68 |
|
---|
69 |
|
---|
70 | % =============
|
---|
71 | % BUILT-INs
|
---|
72 | % =============
|
---|
73 |
|
---|
74 | \input{libobjs} % Built-in Exceptions and Functions
|
---|
75 | \input{libfuncs}
|
---|
76 | \input{libexcs}
|
---|
77 | \input{libconsts}
|
---|
78 |
|
---|
79 | \input{libstdtypes} % Built-in types
|
---|
80 |
|
---|
81 |
|
---|
82 | % =============
|
---|
83 | % BASIC/GENERAL-PURPOSE OBJECTS
|
---|
84 | % =============
|
---|
85 |
|
---|
86 | % Strings
|
---|
87 | \input{libstrings} % String Services
|
---|
88 | \input{libstring}
|
---|
89 | \input{libre}
|
---|
90 | \input{libstruct} % XXX also/better in File Formats?
|
---|
91 | \input{libdifflib}
|
---|
92 | \input{libstringio}
|
---|
93 | \input{libtextwrap}
|
---|
94 | \input{libcodecs}
|
---|
95 | \input{libunicodedata}
|
---|
96 | \input{libstringprep}
|
---|
97 | \input{libfpformat}
|
---|
98 |
|
---|
99 |
|
---|
100 | \input{datatypes} % Data types and structures
|
---|
101 | \input{libdatetime}
|
---|
102 | \input{libcalendar}
|
---|
103 | \input{libcollections}
|
---|
104 | \input{libheapq}
|
---|
105 | \input{libbisect}
|
---|
106 | \input{libarray}
|
---|
107 | \input{libsets}
|
---|
108 | \input{libsched}
|
---|
109 | \input{libmutex}
|
---|
110 | \input{libqueue}
|
---|
111 | \input{libweakref}
|
---|
112 | \input{libuserdict}
|
---|
113 |
|
---|
114 | % General object services
|
---|
115 | % XXX intro
|
---|
116 | \input{libtypes}
|
---|
117 | \input{libnew}
|
---|
118 | \input{libcopy}
|
---|
119 | \input{libpprint}
|
---|
120 | \input{librepr}
|
---|
121 |
|
---|
122 |
|
---|
123 | \input{numeric} % Numeric/Mathematical modules
|
---|
124 | \input{libmath}
|
---|
125 | \input{libcmath}
|
---|
126 | \input{libdecimal}
|
---|
127 | \input{librandom}
|
---|
128 |
|
---|
129 | % Functions, Functional, Generators and Iterators
|
---|
130 | % XXX intro functional
|
---|
131 | \input{libitertools}
|
---|
132 | \input{libfunctools}
|
---|
133 | \input{liboperator} % from runtime - better with itertools and functools
|
---|
134 |
|
---|
135 |
|
---|
136 | % =============
|
---|
137 | % DATA FORMATS
|
---|
138 | % =============
|
---|
139 |
|
---|
140 | % Big move - include all the markup and internet formats here
|
---|
141 |
|
---|
142 | % MIME & email stuff
|
---|
143 | \input{netdata} % Internet Data Handling
|
---|
144 | \input{email}
|
---|
145 | \input{libmailcap}
|
---|
146 | \input{libmailbox}
|
---|
147 | \input{libmhlib}
|
---|
148 | \input{libmimetools}
|
---|
149 | \input{libmimetypes}
|
---|
150 | \input{libmimewriter}
|
---|
151 | \input{libmimify}
|
---|
152 | \input{libmultifile}
|
---|
153 | \input{librfc822}
|
---|
154 |
|
---|
155 | % encoding stuff
|
---|
156 | \input{libbase64}
|
---|
157 | \input{libbinhex}
|
---|
158 | \input{libbinascii}
|
---|
159 | \input{libquopri}
|
---|
160 | \input{libuu}
|
---|
161 |
|
---|
162 | \input{markup} % Structured Markup Processing Tools
|
---|
163 | \input{libhtmlparser}
|
---|
164 | \input{libsgmllib}
|
---|
165 | \input{libhtmllib}
|
---|
166 | \input{libpyexpat}
|
---|
167 | \input{xmldom}
|
---|
168 | \input{xmldomminidom}
|
---|
169 | \input{xmldompulldom}
|
---|
170 | \input{xmlsax}
|
---|
171 | \input{xmlsaxhandler}
|
---|
172 | \input{xmlsaxutils}
|
---|
173 | \input{xmlsaxreader}
|
---|
174 | \input{libetree}
|
---|
175 | % \input{libxmllib}
|
---|
176 |
|
---|
177 | \input{fileformats} % Miscellaneous file formats
|
---|
178 | \input{libcsv}
|
---|
179 | \input{libcfgparser}
|
---|
180 | \input{librobotparser}
|
---|
181 | \input{libnetrc}
|
---|
182 | \input{libxdrlib}
|
---|
183 |
|
---|
184 | \input{libcrypto} % Cryptographic Services
|
---|
185 | \input{libhashlib}
|
---|
186 | \input{libhmac}
|
---|
187 | \input{libmd5}
|
---|
188 | \input{libsha}
|
---|
189 |
|
---|
190 | % =============
|
---|
191 | % FILE & DATABASE STORAGE
|
---|
192 | % =============
|
---|
193 |
|
---|
194 | \input{filesys} % File/directory support
|
---|
195 | \input{libposixpath} % os.path
|
---|
196 | \input{libfileinput}
|
---|
197 | \input{libstat}
|
---|
198 | \input{libstatvfs}
|
---|
199 | \input{libfilecmp}
|
---|
200 | \input{libtempfile}
|
---|
201 | \input{libglob}
|
---|
202 | \input{libfnmatch}
|
---|
203 | \input{liblinecache}
|
---|
204 | \input{libshutil}
|
---|
205 | \input{libdircache}
|
---|
206 |
|
---|
207 |
|
---|
208 | \input{archiving} % Data compression and archiving
|
---|
209 | \input{libzlib}
|
---|
210 | \input{libgzip}
|
---|
211 | \input{libbz2}
|
---|
212 | \input{libzipfile}
|
---|
213 | \input{libtarfile}
|
---|
214 |
|
---|
215 |
|
---|
216 | \input{persistence} % Persistent storage
|
---|
217 | \input{libpickle}
|
---|
218 | \input{libcopyreg} % really copy_reg % from runtime...
|
---|
219 | \input{libshelve}
|
---|
220 | \input{libmarshal}
|
---|
221 | \input{libanydbm}
|
---|
222 | \input{libwhichdb}
|
---|
223 | \input{libdbm}
|
---|
224 | \input{libgdbm}
|
---|
225 | \input{libdbhash}
|
---|
226 | \input{libbsddb}
|
---|
227 | \input{libdumbdbm}
|
---|
228 | \input{libsqlite3}
|
---|
229 |
|
---|
230 |
|
---|
231 | % =============
|
---|
232 | % OS
|
---|
233 | % =============
|
---|
234 |
|
---|
235 |
|
---|
236 | \input{liballos} % Generic Operating System Services
|
---|
237 | \input{libos}
|
---|
238 | \input{libtime}
|
---|
239 | \input{liboptparse}
|
---|
240 | \input{libgetopt}
|
---|
241 | \input{liblogging}
|
---|
242 | \input{libgetpass}
|
---|
243 | \input{libcurses}
|
---|
244 | \input{libascii} % curses.ascii
|
---|
245 | \input{libcursespanel}
|
---|
246 | \input{libplatform}
|
---|
247 | \input{liberrno}
|
---|
248 | \input{libctypes}
|
---|
249 |
|
---|
250 | \input{libsomeos} % Optional Operating System Services
|
---|
251 | \input{libselect}
|
---|
252 | \input{libthread}
|
---|
253 | \input{libthreading}
|
---|
254 | \input{libdummythread}
|
---|
255 | \input{libdummythreading}
|
---|
256 | \input{libmmap}
|
---|
257 | \input{libreadline}
|
---|
258 | \input{librlcompleter}
|
---|
259 |
|
---|
260 | \input{libunix} % UNIX Specific Services
|
---|
261 | \input{libposix}
|
---|
262 | \input{libpwd}
|
---|
263 | \input{libspwd}
|
---|
264 | \input{libgrp}
|
---|
265 | \input{libcrypt}
|
---|
266 | \input{libdl}
|
---|
267 | \input{libtermios}
|
---|
268 | \input{libtty}
|
---|
269 | \input{libpty}
|
---|
270 | \input{libfcntl}
|
---|
271 | \input{libpipes}
|
---|
272 | \input{libposixfile}
|
---|
273 | \input{libresource}
|
---|
274 | \input{libnis}
|
---|
275 | \input{libsyslog}
|
---|
276 | \input{libcommands}
|
---|
277 |
|
---|
278 |
|
---|
279 | % =============
|
---|
280 | % NETWORK & COMMUNICATIONS
|
---|
281 | % =============
|
---|
282 |
|
---|
283 | \input{ipc} % Interprocess communication/networking
|
---|
284 | \input{libsubprocess}
|
---|
285 | \input{libsocket}
|
---|
286 | \input{libsignal}
|
---|
287 | \input{libpopen2}
|
---|
288 | \input{libasyncore}
|
---|
289 | \input{libasynchat}
|
---|
290 |
|
---|
291 | \input{internet} % Internet Protocols
|
---|
292 | \input{libwebbrowser}
|
---|
293 | \input{libcgi}
|
---|
294 | \input{libcgitb}
|
---|
295 | \input{libwsgiref}
|
---|
296 | \input{liburllib}
|
---|
297 | \input{liburllib2}
|
---|
298 | \input{libhttplib}
|
---|
299 | \input{libftplib}
|
---|
300 | \input{libgopherlib}
|
---|
301 | \input{libpoplib}
|
---|
302 | \input{libimaplib}
|
---|
303 | \input{libnntplib}
|
---|
304 | \input{libsmtplib}
|
---|
305 | \input{libsmtpd}
|
---|
306 | \input{libtelnetlib}
|
---|
307 | \input{libuuid}
|
---|
308 | \input{liburlparse}
|
---|
309 | \input{libsocksvr}
|
---|
310 | \input{libbasehttp}
|
---|
311 | \input{libsimplehttp}
|
---|
312 | \input{libcgihttp}
|
---|
313 | \input{libcookielib}
|
---|
314 | \input{libcookie}
|
---|
315 | \input{libxmlrpclib}
|
---|
316 | \input{libsimplexmlrpc}
|
---|
317 | \input{libdocxmlrpc}
|
---|
318 |
|
---|
319 | % =============
|
---|
320 | % MULTIMEDIA
|
---|
321 | % =============
|
---|
322 |
|
---|
323 | \input{libmm} % Multimedia Services
|
---|
324 | \input{libaudioop}
|
---|
325 | \input{libimageop}
|
---|
326 | \input{libaifc}
|
---|
327 | \input{libsunau}
|
---|
328 | \input{libwave}
|
---|
329 | \input{libchunk}
|
---|
330 | \input{libcolorsys}
|
---|
331 | \input{librgbimg}
|
---|
332 | \input{libimghdr}
|
---|
333 | \input{libsndhdr}
|
---|
334 | \input{libossaudiodev}
|
---|
335 |
|
---|
336 | % Tkinter is a chapter in its own right.
|
---|
337 | \input{tkinter}
|
---|
338 |
|
---|
339 | % % Internationalization
|
---|
340 | \input{i18n}
|
---|
341 | \input{libgettext}
|
---|
342 | \input{liblocale}
|
---|
343 |
|
---|
344 | % =============
|
---|
345 | % PROGRAM FRAMEWORKS
|
---|
346 | % =============
|
---|
347 | \input{frameworks}
|
---|
348 | \input{libcmd}
|
---|
349 | \input{libshlex}
|
---|
350 |
|
---|
351 |
|
---|
352 | % =============
|
---|
353 | % DEVELOPMENT TOOLS
|
---|
354 | % =============
|
---|
355 | % % Software development support
|
---|
356 | \input{development}
|
---|
357 | \input{libpydoc}
|
---|
358 | \input{libdoctest}
|
---|
359 | \input{libunittest}
|
---|
360 | \input{libtest}
|
---|
361 |
|
---|
362 | \input{libpdb} % The Python Debugger
|
---|
363 |
|
---|
364 | \input{libprofile} % The Python Profiler
|
---|
365 | \input{libhotshot} % unmaintained C profiler
|
---|
366 | \input{libtimeit}
|
---|
367 | \input{libtrace}
|
---|
368 |
|
---|
369 | % =============
|
---|
370 | % PYTHON ENGINE
|
---|
371 | % =============
|
---|
372 |
|
---|
373 | % Runtime services
|
---|
374 | \input{libpython} % Python Runtime Services
|
---|
375 | \input{libsys}
|
---|
376 | \input{libbltin} % really __builtin__
|
---|
377 | \input{libmain} % really __main__
|
---|
378 | \input{libwarnings}
|
---|
379 | \input{libcontextlib}
|
---|
380 | \input{libatexit}
|
---|
381 | \input{libtraceback}
|
---|
382 | \input{libfuture} % really __future__
|
---|
383 | \input{libgc}
|
---|
384 | \input{libinspect}
|
---|
385 | \input{libsite}
|
---|
386 | \input{libuser}
|
---|
387 | \input{libfpectl}
|
---|
388 |
|
---|
389 |
|
---|
390 | \input{custominterp} % Custom interpreter
|
---|
391 | \input{libcode}
|
---|
392 | \input{libcodeop}
|
---|
393 | \input{librestricted} % Restricted Execution
|
---|
394 | \input{librexec}
|
---|
395 | \input{libbastion}
|
---|
396 |
|
---|
397 |
|
---|
398 | \input{modules} % Importing Modules
|
---|
399 | \input{libimp}
|
---|
400 | \input{libzipimport}
|
---|
401 | \input{libpkgutil}
|
---|
402 | \input{libmodulefinder}
|
---|
403 | \input{librunpy}
|
---|
404 |
|
---|
405 |
|
---|
406 | % =============
|
---|
407 | % PYTHON LANGUAGE & COMPILER
|
---|
408 | % =============
|
---|
409 |
|
---|
410 | \input{language} % Python Language Services
|
---|
411 | \input{libparser}
|
---|
412 | \input{libsymbol}
|
---|
413 | \input{libtoken}
|
---|
414 | \input{libkeyword}
|
---|
415 | \input{libtokenize}
|
---|
416 | \input{libtabnanny}
|
---|
417 | \input{libpyclbr}
|
---|
418 | \input{libpycompile} % really py_compile
|
---|
419 | \input{libcompileall}
|
---|
420 | \input{libdis}
|
---|
421 | \input{libpickletools}
|
---|
422 | \input{distutils}
|
---|
423 |
|
---|
424 | \input{compiler} % compiler package
|
---|
425 | \input{libast}
|
---|
426 |
|
---|
427 | \input{libmisc} % Miscellaneous Services
|
---|
428 | \input{libformatter}
|
---|
429 |
|
---|
430 | % =============
|
---|
431 | % OTHER PLATFORM-SPECIFIC STUFF
|
---|
432 | % =============
|
---|
433 |
|
---|
434 | %\input{libamoeba} % AMOEBA ONLY
|
---|
435 |
|
---|
436 | %\input{libstdwin} % STDWIN ONLY
|
---|
437 |
|
---|
438 | \input{libsgi} % SGI IRIX ONLY
|
---|
439 | \input{libal}
|
---|
440 | \input{libcd}
|
---|
441 | \input{libfl}
|
---|
442 | \input{libfm}
|
---|
443 | \input{libgl}
|
---|
444 | \input{libimgfile}
|
---|
445 | \input{libjpeg}
|
---|
446 | %\input{libpanel}
|
---|
447 |
|
---|
448 | \input{libsun} % SUNOS ONLY
|
---|
449 | \input{libsunaudio}
|
---|
450 |
|
---|
451 | \input{windows} % MS Windows ONLY
|
---|
452 | \input{libmsilib}
|
---|
453 | \input{libmsvcrt}
|
---|
454 | \input{libwinreg}
|
---|
455 | \input{libwinsound}
|
---|
456 |
|
---|
457 | \appendix
|
---|
458 | \input{libundoc}
|
---|
459 |
|
---|
460 | %\chapter{Obsolete Modules}
|
---|
461 | %\input{libcmpcache}
|
---|
462 | %\input{libcmp}
|
---|
463 | %\input{libni}
|
---|
464 |
|
---|
465 | \chapter{Reporting Bugs}
|
---|
466 | \input{reportingbugs}
|
---|
467 |
|
---|
468 | \chapter{History and License}
|
---|
469 | \input{license}
|
---|
470 |
|
---|
471 | %
|
---|
472 | % The ugly "%begin{latexonly}" pseudo-environments are really just to
|
---|
473 | % keep LaTeX2HTML quiet during the \renewcommand{} macros; they're
|
---|
474 | % not really valuable.
|
---|
475 | %
|
---|
476 |
|
---|
477 | %begin{latexonly}
|
---|
478 | \renewcommand{\indexname}{Module Index}
|
---|
479 | %end{latexonly}
|
---|
480 | \input{modlib.ind} % Module Index
|
---|
481 |
|
---|
482 | %begin{latexonly}
|
---|
483 | \renewcommand{\indexname}{Index}
|
---|
484 | %end{latexonly}
|
---|
485 | \input{lib.ind} % Index
|
---|
486 |
|
---|
487 | \end{document}
|
---|