1998-03-03 22:02:19 +00:00
|
|
|
\documentclass{manual}
|
1991-02-19 12:53:17 +00:00
|
|
|
|
1995-02-28 17:14:32 +00:00
|
|
|
% NOTE: this file controls which chapters/sections of the library
|
|
|
|
% manual are actually printed. It is easy to customize your manual
|
|
|
|
% by commenting out sections that you're not interested in.
|
|
|
|
|
1994-08-01 12:22:53 +00:00
|
|
|
\title{Python Library Reference}
|
1991-01-22 11:45:29 +00:00
|
|
|
|
1994-10-06 10:29:26 +00:00
|
|
|
\input{boilerplate}
|
1994-08-01 12:22:53 +00:00
|
|
|
|
1998-03-09 16:39:22 +00:00
|
|
|
\makeindex % tell \index to actually write the
|
|
|
|
% .idx file
|
|
|
|
\makemodindex % ... and the module index as well.
|
1993-11-23 16:28:45 +00:00
|
|
|
|
1992-01-07 16:40:44 +00:00
|
|
|
|
1991-01-22 11:45:29 +00:00
|
|
|
\begin{document}
|
1994-08-01 12:22:53 +00:00
|
|
|
|
1991-01-22 11:45:29 +00:00
|
|
|
\maketitle
|
|
|
|
|
1998-07-28 21:55:19 +00:00
|
|
|
\ifhtml
|
|
|
|
\chapter*{Front Matter\label{front}}
|
|
|
|
\fi
|
|
|
|
|
1994-10-06 10:29:26 +00:00
|
|
|
\input{copyright}
|
|
|
|
|
1991-01-22 11:45:29 +00:00
|
|
|
\begin{abstract}
|
|
|
|
|
|
|
|
\noindent
|
1995-03-30 16:01:33 +00:00
|
|
|
Python is an extensible, interpreted, object-oriented programming
|
|
|
|
language. It supports a wide range of applications, from simple text
|
|
|
|
processing scripts to interactive WWW browsers.
|
|
|
|
|
1999-11-10 16:21:37 +00:00
|
|
|
While the \citetitle[../ref/ref.html]{Python Reference Manual}
|
|
|
|
describes the exact syntax and semantics of the language, it does not
|
|
|
|
describe the standard library that is distributed with the language,
|
|
|
|
and which greatly enhances its immediate usability. This library
|
|
|
|
contains built-in modules (written in C) that provide access to system
|
|
|
|
functionality such as file I/O that would otherwise be inaccessible to
|
|
|
|
Python programmers, as well as modules written in Python that provide
|
|
|
|
standardized solutions for many problems that occur in everyday
|
|
|
|
programming. Some of these modules are explicitly designed to
|
|
|
|
encourage and enhance the portability of Python programs.
|
1995-03-30 16:01:33 +00:00
|
|
|
|
|
|
|
This library reference manual documents Python's standard library, as
|
|
|
|
well as many optional library modules (which may or may not be
|
|
|
|
available, depending on whether the underlying platform supports them
|
|
|
|
and on the configuration choices made at compile time). It also
|
|
|
|
documents the standard types of the language and its built-in
|
|
|
|
functions and exceptions, many of which are not or incompletely
|
|
|
|
documented in the Reference Manual.
|
|
|
|
|
|
|
|
This manual assumes basic knowledge about the Python language. For an
|
1999-11-10 16:21:37 +00:00
|
|
|
informal introduction to Python, see the
|
|
|
|
\citetitle[../tut/tut.html]{Python Tutorial}; the
|
|
|
|
\citetitle[../ref/ref.html]{Python Reference Manual} remains the
|
|
|
|
highest authority on syntactic and semantic questions. Finally, the
|
|
|
|
manual entitled \citetitle[../ext/ext.html]{Extending and Embedding
|
|
|
|
the Python Interpreter} describes how to add new extensions to Python
|
|
|
|
and how to embed it in other applications.
|
1991-01-22 11:45:29 +00:00
|
|
|
|
|
|
|
\end{abstract}
|
|
|
|
|
1998-01-13 22:25:02 +00:00
|
|
|
\tableofcontents
|
1991-01-22 11:45:29 +00:00
|
|
|
|
1994-08-01 12:22:53 +00:00
|
|
|
% Chapter title:
|
|
|
|
|
|
|
|
\input{libintro} % Introduction
|
|
|
|
|
|
|
|
\input{libobjs} % Built-in Types, Exceptions and Functions
|
1998-07-24 13:56:11 +00:00
|
|
|
\input{libstdtypes}
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{libexcs}
|
|
|
|
\input{libfuncs}
|
|
|
|
|
2000-08-03 21:18:18 +00:00
|
|
|
\input{libpython} % Python Runtime Services
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{libsys}
|
2000-07-12 04:22:53 +00:00
|
|
|
\input{libgc}
|
2000-06-28 15:07:31 +00:00
|
|
|
\input{libatexit}
|
1998-07-24 13:56:11 +00:00
|
|
|
\input{libtypes}
|
1997-08-30 20:02:25 +00:00
|
|
|
\input{libuserdict}
|
1996-12-06 21:22:41 +00:00
|
|
|
\input{liboperator}
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libtraceback}
|
1999-06-14 19:49:50 +00:00
|
|
|
\input{liblinecache}
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libpickle}
|
1998-08-11 15:47:16 +00:00
|
|
|
\input{libcopyreg} % really copy_reg
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libshelve}
|
|
|
|
\input{libcopy}
|
|
|
|
\input{libmarshal}
|
1995-01-04 19:17:34 +00:00
|
|
|
\input{libimp}
|
1998-04-09 11:04:19 +00:00
|
|
|
%\input{libni}
|
1997-07-18 21:08:07 +00:00
|
|
|
\input{libcode}
|
1999-06-23 13:34:22 +00:00
|
|
|
\input{libcodeop}
|
1997-10-06 21:26:03 +00:00
|
|
|
\input{libpprint}
|
1999-01-27 17:20:33 +00:00
|
|
|
\input{librepr}
|
1999-06-17 15:12:16 +00:00
|
|
|
\input{libnew}
|
1997-04-03 22:41:49 +00:00
|
|
|
\input{libsite}
|
1997-08-30 20:02:25 +00:00
|
|
|
\input{libuser}
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libbltin} % really __builtin__
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{libmain} % really __main__
|
1995-03-28 13:35:14 +00:00
|
|
|
|
|
|
|
\input{libstrings} % String Services
|
|
|
|
\input{libstring}
|
1997-12-29 20:01:55 +00:00
|
|
|
\input{libre}
|
2000-09-25 18:26:21 +00:00
|
|
|
%\input{libregex}
|
|
|
|
%\input{libregsub}
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{libstruct}
|
1999-06-11 18:36:42 +00:00
|
|
|
\input{libfpformat}
|
1998-07-24 13:56:11 +00:00
|
|
|
\input{libstringio}
|
2000-04-06 14:25:28 +00:00
|
|
|
\input{libcodecs}
|
2000-06-13 20:51:29 +00:00
|
|
|
\input{libunicodedata}
|
1998-04-09 14:23:48 +00:00
|
|
|
%\input{libsoundex}
|
1994-08-01 12:22:53 +00:00
|
|
|
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libmisc} % Miscellaneous Services
|
|
|
|
\input{libmath}
|
1997-07-17 16:15:18 +00:00
|
|
|
\input{libcmath}
|
1997-04-03 22:41:49 +00:00
|
|
|
\input{librandom}
|
1999-08-23 20:12:11 +00:00
|
|
|
\input{libwhrandom}
|
1998-04-09 04:51:07 +00:00
|
|
|
%\input{librand}
|
1998-04-28 18:27:53 +00:00
|
|
|
\input{libbisect}
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libarray}
|
1999-01-26 15:47:59 +00:00
|
|
|
\input{libcfgparser}
|
1998-04-04 05:50:12 +00:00
|
|
|
\input{libfileinput}
|
1998-04-28 14:29:27 +00:00
|
|
|
\input{libcalendar}
|
1998-06-28 17:55:53 +00:00
|
|
|
\input{libcmd}
|
1998-12-22 05:18:24 +00:00
|
|
|
\input{libshlex}
|
1995-03-02 12:38:39 +00:00
|
|
|
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{liballos} % Generic Operating System Services
|
|
|
|
\input{libos}
|
1999-02-02 19:00:37 +00:00
|
|
|
\input{libposixpath} % os.path
|
1999-06-17 15:12:16 +00:00
|
|
|
\input{libdircache}
|
1999-04-22 15:01:44 +00:00
|
|
|
\input{libstat}
|
1999-06-17 15:12:16 +00:00
|
|
|
\input{libstatcache}
|
1999-06-21 18:25:49 +00:00
|
|
|
\input{libstatvfs}
|
1999-10-29 17:24:12 +00:00
|
|
|
\input{libfilecmp}
|
2000-08-31 06:09:26 +00:00
|
|
|
\input{libpopen2}
|
1999-10-26 16:28:04 +00:00
|
|
|
%\input{libcmp}
|
|
|
|
%\input{libcmpcache}
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libtime}
|
1999-06-25 18:54:30 +00:00
|
|
|
\input{libsched}
|
1998-12-22 23:37:46 +00:00
|
|
|
\input{libgetpass}
|
1999-06-21 21:14:30 +00:00
|
|
|
\input{libcurses}
|
2000-06-28 22:05:44 +00:00
|
|
|
\input{libascii} % curses.ascii
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libgetopt}
|
|
|
|
\input{libtempfile}
|
1996-07-30 18:20:01 +00:00
|
|
|
\input{liberrno}
|
1997-03-25 22:09:18 +00:00
|
|
|
\input{libglob}
|
1997-04-27 21:25:52 +00:00
|
|
|
\input{libfnmatch}
|
1998-12-28 20:16:58 +00:00
|
|
|
\input{libshutil}
|
1997-11-20 21:04:27 +00:00
|
|
|
\input{liblocale}
|
2000-08-30 03:26:17 +00:00
|
|
|
\input{libgettext}
|
1995-03-02 12:38:39 +00:00
|
|
|
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libsomeos} % Optional Operating System Services
|
|
|
|
\input{libsignal}
|
|
|
|
\input{libsocket}
|
|
|
|
\input{libselect}
|
|
|
|
\input{libthread}
|
1998-07-20 17:34:50 +00:00
|
|
|
\input{libthreading}
|
2000-10-10 16:46:36 +00:00
|
|
|
\input{libmutex}
|
1997-11-20 19:54:16 +00:00
|
|
|
\input{libqueue}
|
2000-09-05 13:49:30 +00:00
|
|
|
\input{libmmap}
|
1997-04-03 22:41:49 +00:00
|
|
|
\input{libanydbm}
|
1999-04-15 15:11:40 +00:00
|
|
|
\input{libdbhash}
|
1997-04-03 22:41:49 +00:00
|
|
|
\input{libwhichdb}
|
1999-04-19 21:21:28 +00:00
|
|
|
\input{libbsddb}
|
1997-04-30 19:40:10 +00:00
|
|
|
\input{libzlib}
|
1997-07-17 16:27:42 +00:00
|
|
|
\input{libgzip}
|
2000-03-31 17:51:10 +00:00
|
|
|
\input{libzipfile}
|
2000-07-06 04:47:25 +00:00
|
|
|
\input{libreadline}
|
1999-06-21 18:25:49 +00:00
|
|
|
\input{librlcompleter}
|
1994-08-01 12:22:53 +00:00
|
|
|
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libunix} % UNIX Specific Services
|
|
|
|
\input{libposix}
|
|
|
|
\input{libpwd}
|
|
|
|
\input{libgrp}
|
1996-04-10 16:18:20 +00:00
|
|
|
\input{libcrypt}
|
1999-07-01 20:39:59 +00:00
|
|
|
\input{libdl}
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{libdbm}
|
1994-08-08 08:03:24 +00:00
|
|
|
\input{libgdbm}
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libtermios}
|
1999-06-23 17:29:02 +00:00
|
|
|
\input{libtty}
|
1999-06-29 18:12:22 +00:00
|
|
|
\input{libpty}
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libfcntl}
|
1999-06-21 18:25:49 +00:00
|
|
|
\input{libpipes}
|
1995-01-04 19:17:34 +00:00
|
|
|
\input{libposixfile}
|
1996-12-18 18:37:05 +00:00
|
|
|
\input{libresource}
|
1999-06-27 15:02:37 +00:00
|
|
|
\input{libnis}
|
1995-10-09 20:49:57 +00:00
|
|
|
\input{libsyslog}
|
1997-06-12 16:05:46 +00:00
|
|
|
\input{libcommands}
|
1994-08-01 12:22:53 +00:00
|
|
|
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libpdb} % The Python Debugger
|
|
|
|
|
|
|
|
\input{libprofile} % The Python Profiler
|
|
|
|
|
1998-08-07 15:58:31 +00:00
|
|
|
\input{internet} % Internet Protocols
|
2000-07-07 03:36:12 +00:00
|
|
|
\input{libwebbrowser}
|
1995-02-27 17:53:25 +00:00
|
|
|
\input{libcgi}
|
1995-03-22 15:48:46 +00:00
|
|
|
\input{liburllib}
|
|
|
|
\input{libhttplib}
|
1995-02-16 16:28:22 +00:00
|
|
|
\input{libftplib}
|
|
|
|
\input{libgopherlib}
|
1998-04-24 20:49:02 +00:00
|
|
|
\input{libpoplib}
|
1998-04-11 04:27:07 +00:00
|
|
|
\input{libimaplib}
|
1995-02-16 16:28:22 +00:00
|
|
|
\input{libnntplib}
|
1998-06-28 17:55:53 +00:00
|
|
|
\input{libsmtplib}
|
1999-03-15 15:44:18 +00:00
|
|
|
\input{libtelnetlib}
|
1995-02-16 16:28:22 +00:00
|
|
|
\input{liburlparse}
|
1998-08-07 15:58:31 +00:00
|
|
|
\input{libsocksvr}
|
|
|
|
\input{libbasehttp}
|
1999-06-14 19:49:50 +00:00
|
|
|
\input{libsimplehttp}
|
|
|
|
\input{libcgihttp}
|
2000-08-19 16:55:31 +00:00
|
|
|
\input{libcookie}
|
1999-07-02 14:27:03 +00:00
|
|
|
\input{libasyncore}
|
1998-08-07 15:58:31 +00:00
|
|
|
|
1999-06-25 18:54:30 +00:00
|
|
|
\input{netdata} % Internet Data Handling
|
1996-10-08 21:54:41 +00:00
|
|
|
\input{libformatter}
|
1995-03-22 15:48:46 +00:00
|
|
|
\input{librfc822}
|
|
|
|
\input{libmimetools}
|
1999-02-12 19:26:09 +00:00
|
|
|
\input{libmimewriter}
|
1998-06-28 17:55:53 +00:00
|
|
|
\input{libmultifile}
|
1998-02-19 18:29:18 +00:00
|
|
|
\input{libbinhex}
|
|
|
|
\input{libuu}
|
1995-08-29 11:30:24 +00:00
|
|
|
\input{libbinascii}
|
1996-08-19 22:58:03 +00:00
|
|
|
\input{libxdrlib}
|
1997-03-25 22:09:18 +00:00
|
|
|
\input{libmailcap}
|
1998-05-19 15:03:45 +00:00
|
|
|
\input{libmimetypes}
|
1997-04-27 21:25:52 +00:00
|
|
|
\input{libbase64}
|
|
|
|
\input{libquopri}
|
1997-06-02 17:35:51 +00:00
|
|
|
\input{libmailbox}
|
1999-03-15 15:44:18 +00:00
|
|
|
\input{libmhlib}
|
1997-07-30 22:05:07 +00:00
|
|
|
\input{libmimify}
|
1998-12-22 05:18:24 +00:00
|
|
|
\input{libnetrc}
|
2000-03-31 17:51:10 +00:00
|
|
|
\input{librobotparser}
|
1995-02-16 16:28:22 +00:00
|
|
|
|
2000-07-05 02:24:39 +00:00
|
|
|
\input{markup} % Structured Markup Processing Tools
|
|
|
|
\input{libsgmllib}
|
|
|
|
\input{libhtmllib}
|
|
|
|
\input{libpyexpat}
|
2000-09-20 02:54:58 +00:00
|
|
|
\input{xmlsax}
|
2000-10-12 20:07:09 +00:00
|
|
|
\input{xmlsaxhandler}
|
|
|
|
\input{xmlsaxutils}
|
|
|
|
\input{xmlsaxreader}
|
2000-10-09 18:11:24 +00:00
|
|
|
\input{libxmllib}
|
2000-07-05 02:24:39 +00:00
|
|
|
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libmm} % Multimedia Services
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{libaudioop}
|
|
|
|
\input{libimageop}
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libaifc}
|
1999-06-23 13:34:22 +00:00
|
|
|
\input{libsunau}
|
1999-06-17 15:12:16 +00:00
|
|
|
\input{libwave}
|
1999-06-22 18:50:06 +00:00
|
|
|
\input{libchunk}
|
1999-04-19 21:21:28 +00:00
|
|
|
\input{libcolorsys}
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{librgbimg}
|
1996-08-19 22:58:03 +00:00
|
|
|
\input{libimghdr}
|
1999-01-05 23:09:12 +00:00
|
|
|
\input{libsndhdr}
|
1994-08-01 12:22:53 +00:00
|
|
|
|
1995-03-28 13:35:14 +00:00
|
|
|
\input{libcrypto} % Cryptographic Services
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{libmd5}
|
1999-04-23 21:52:18 +00:00
|
|
|
\input{libsha}
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{libmpz}
|
|
|
|
\input{librotor}
|
|
|
|
|
2000-08-03 21:18:18 +00:00
|
|
|
\input{librestricted} % Restricted Execution
|
|
|
|
\input{librexec}
|
|
|
|
\input{libbastion}
|
|
|
|
|
|
|
|
\input{language} % Python Language Services
|
|
|
|
\input{libparser}
|
|
|
|
\input{libsymbol}
|
|
|
|
\input{libtoken}
|
|
|
|
\input{libkeyword}
|
|
|
|
\input{libtokenize}
|
|
|
|
\input{libtabnanny}
|
|
|
|
\input{libpyclbr}
|
|
|
|
\input{libpycompile} % really py_compile
|
|
|
|
\input{libcompileall}
|
|
|
|
\input{libdis}
|
|
|
|
|
1994-08-01 12:22:53 +00:00
|
|
|
%\input{libamoeba} % AMOEBA ONLY
|
|
|
|
|
1997-06-02 17:35:51 +00:00
|
|
|
%\input{libstdwin} % STDWIN ONLY
|
1994-08-01 12:22:53 +00:00
|
|
|
|
|
|
|
\input{libsgi} % SGI IRIX ONLY
|
|
|
|
\input{libal}
|
1995-03-28 11:56:52 +00:00
|
|
|
\input{libcd}
|
1994-08-01 12:22:53 +00:00
|
|
|
\input{libfl}
|
|
|
|
\input{libfm}
|
|
|
|
\input{libgl}
|
|
|
|
\input{libimgfile}
|
1999-01-20 15:55:20 +00:00
|
|
|
\input{libjpeg}
|
1994-08-01 12:22:53 +00:00
|
|
|
%\input{libpanel}
|
|
|
|
|
|
|
|
\input{libsun} % SUNOS ONLY
|
1998-02-19 18:59:48 +00:00
|
|
|
\input{libsunaudio}
|
1994-08-01 12:22:53 +00:00
|
|
|
|
1999-02-16 19:18:38 +00:00
|
|
|
\input{windows} % MS Windows ONLY
|
|
|
|
\input{libmsvcrt}
|
2000-06-07 04:07:48 +00:00
|
|
|
\input{libwinreg}
|
1999-02-16 19:18:38 +00:00
|
|
|
\input{libwinsound}
|
|
|
|
|
2000-09-21 21:35:22 +00:00
|
|
|
\appendix
|
1997-03-14 04:12:52 +00:00
|
|
|
\input{libundoc}
|
2000-09-21 21:35:22 +00:00
|
|
|
\chapter{Reporting Bugs}
|
|
|
|
\input{reportingbugs}
|
1997-03-14 04:12:52 +00:00
|
|
|
|
1998-03-17 06:23:13 +00:00
|
|
|
%
|
|
|
|
% The ugly "%begin{latexonly}" pseudo-environments are really just to
|
|
|
|
% keep LaTeX2HTML quiet during the \renewcommand{} macros; they're
|
|
|
|
% not really valuable.
|
|
|
|
%
|
|
|
|
|
|
|
|
%begin{latexonly}
|
1998-01-02 02:59:09 +00:00
|
|
|
\renewcommand{\indexname}{Module Index}
|
1998-03-17 06:23:13 +00:00
|
|
|
%end{latexonly}
|
|
|
|
\input{modlib.ind} % Module Index
|
1998-01-02 02:59:09 +00:00
|
|
|
|
1998-03-17 06:23:13 +00:00
|
|
|
%begin{latexonly}
|
1998-01-02 02:59:09 +00:00
|
|
|
\renewcommand{\indexname}{Index}
|
1998-03-17 06:23:13 +00:00
|
|
|
%end{latexonly}
|
|
|
|
\input{lib.ind} % Index
|
1991-01-22 11:45:29 +00:00
|
|
|
|
|
|
|
\end{document}
|