1998-03-03 18:02:19 -04:00
|
|
|
\documentclass{manual}
|
1991-02-19 08:53:17 -04:00
|
|
|
|
1995-02-28 13:14:32 -04: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 09:22:53 -03:00
|
|
|
\title{Python Library Reference}
|
1991-01-22 07:45:29 -04:00
|
|
|
|
1994-10-06 07:29:26 -03:00
|
|
|
\input{boilerplate}
|
1994-08-01 09:22:53 -03:00
|
|
|
|
1998-03-09 12:39:22 -04:00
|
|
|
\makeindex % tell \index to actually write the
|
|
|
|
% .idx file
|
|
|
|
\makemodindex % ... and the module index as well.
|
1993-11-23 12:28:45 -04:00
|
|
|
|
1992-01-07 12:40:44 -04:00
|
|
|
|
1991-01-22 07:45:29 -04:00
|
|
|
\begin{document}
|
1994-08-01 09:22:53 -03:00
|
|
|
|
1991-01-22 07:45:29 -04:00
|
|
|
\maketitle
|
|
|
|
|
1998-07-28 18:55:19 -03:00
|
|
|
\ifhtml
|
|
|
|
\chapter*{Front Matter\label{front}}
|
|
|
|
\fi
|
|
|
|
|
1994-10-06 07:29:26 -03:00
|
|
|
\input{copyright}
|
|
|
|
|
1991-01-22 07:45:29 -04:00
|
|
|
\begin{abstract}
|
|
|
|
|
|
|
|
\noindent
|
1995-03-30 12:01:33 -04: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 12:21:37 -04: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 12:01:33 -04: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 12:21:37 -04: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 07:45:29 -04:00
|
|
|
|
|
|
|
\end{abstract}
|
|
|
|
|
1998-01-13 18:25:02 -04:00
|
|
|
\tableofcontents
|
1991-01-22 07:45:29 -04:00
|
|
|
|
1994-08-01 09:22:53 -03:00
|
|
|
% Chapter title:
|
|
|
|
|
|
|
|
\input{libintro} % Introduction
|
|
|
|
|
|
|
|
\input{libobjs} % Built-in Types, Exceptions and Functions
|
1998-07-24 10:56:11 -03:00
|
|
|
\input{libstdtypes}
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libexcs}
|
|
|
|
\input{libfuncs}
|
|
|
|
|
2000-08-03 18:18:18 -03:00
|
|
|
\input{libpython} % Python Runtime Services
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libsys}
|
2000-07-12 01:22:53 -03:00
|
|
|
\input{libgc}
|
2000-06-28 12:07:31 -03:00
|
|
|
\input{libatexit}
|
1998-07-24 10:56:11 -03:00
|
|
|
\input{libtypes}
|
1997-08-30 17:02:25 -03:00
|
|
|
\input{libuserdict}
|
1996-12-06 17:22:41 -04:00
|
|
|
\input{liboperator}
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libtraceback}
|
1999-06-14 16:49:50 -03:00
|
|
|
\input{liblinecache}
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libpickle}
|
1998-08-11 12:47:16 -03:00
|
|
|
\input{libcopyreg} % really copy_reg
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libshelve}
|
|
|
|
\input{libcopy}
|
|
|
|
\input{libmarshal}
|
1995-01-04 15:17:34 -04:00
|
|
|
\input{libimp}
|
1998-04-09 08:04:19 -03:00
|
|
|
%\input{libni}
|
1997-07-18 18:08:07 -03:00
|
|
|
\input{libcode}
|
1999-06-23 10:34:22 -03:00
|
|
|
\input{libcodeop}
|
1997-10-06 18:26:03 -03:00
|
|
|
\input{libpprint}
|
1999-01-27 13:20:33 -04:00
|
|
|
\input{librepr}
|
1999-06-17 12:12:16 -03:00
|
|
|
\input{libnew}
|
1997-04-03 18:41:49 -04:00
|
|
|
\input{libsite}
|
1997-08-30 17:02:25 -03:00
|
|
|
\input{libuser}
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libbltin} % really __builtin__
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libmain} % really __main__
|
1995-03-28 09:35:14 -04:00
|
|
|
|
|
|
|
\input{libstrings} % String Services
|
|
|
|
\input{libstring}
|
1997-12-29 16:01:55 -04:00
|
|
|
\input{libre}
|
2000-09-25 15:26:21 -03:00
|
|
|
%\input{libregex}
|
|
|
|
%\input{libregsub}
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libstruct}
|
1999-06-11 15:36:42 -03:00
|
|
|
\input{libfpformat}
|
1998-07-24 10:56:11 -03:00
|
|
|
\input{libstringio}
|
2000-04-06 11:25:28 -03:00
|
|
|
\input{libcodecs}
|
2000-06-13 17:51:29 -03:00
|
|
|
\input{libunicodedata}
|
1998-04-09 11:23:48 -03:00
|
|
|
%\input{libsoundex}
|
1994-08-01 09:22:53 -03:00
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libmisc} % Miscellaneous Services
|
|
|
|
\input{libmath}
|
1997-07-17 13:15:18 -03:00
|
|
|
\input{libcmath}
|
1997-04-03 18:41:49 -04:00
|
|
|
\input{librandom}
|
1999-08-23 17:12:11 -03:00
|
|
|
\input{libwhrandom}
|
1998-04-09 01:51:07 -03:00
|
|
|
%\input{librand}
|
1998-04-28 15:27:53 -03:00
|
|
|
\input{libbisect}
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libarray}
|
1999-01-26 11:47:59 -04:00
|
|
|
\input{libcfgparser}
|
1998-04-04 01:50:12 -04:00
|
|
|
\input{libfileinput}
|
1998-04-28 11:29:27 -03:00
|
|
|
\input{libcalendar}
|
1998-06-28 14:55:53 -03:00
|
|
|
\input{libcmd}
|
1998-12-22 01:18:24 -04:00
|
|
|
\input{libshlex}
|
1995-03-02 08:38:39 -04:00
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{liballos} % Generic Operating System Services
|
|
|
|
\input{libos}
|
1999-02-02 15:00:37 -04:00
|
|
|
\input{libposixpath} % os.path
|
1999-06-17 12:12:16 -03:00
|
|
|
\input{libdircache}
|
1999-04-22 12:01:44 -03:00
|
|
|
\input{libstat}
|
1999-06-17 12:12:16 -03:00
|
|
|
\input{libstatcache}
|
1999-06-21 15:25:49 -03:00
|
|
|
\input{libstatvfs}
|
1999-10-29 14:24:12 -03:00
|
|
|
\input{libfilecmp}
|
2000-08-31 03:09:26 -03:00
|
|
|
\input{libpopen2}
|
1999-10-26 13:28:04 -03:00
|
|
|
%\input{libcmp}
|
|
|
|
%\input{libcmpcache}
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libtime}
|
1999-06-25 15:54:30 -03:00
|
|
|
\input{libsched}
|
1998-12-22 19:37:46 -04:00
|
|
|
\input{libgetpass}
|
1999-06-21 18:14:30 -03:00
|
|
|
\input{libcurses}
|
2000-06-28 19:05:44 -03:00
|
|
|
\input{libascii} % curses.ascii
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libgetopt}
|
|
|
|
\input{libtempfile}
|
1996-07-30 15:20:01 -03:00
|
|
|
\input{liberrno}
|
1997-03-25 18:09:18 -04:00
|
|
|
\input{libglob}
|
1997-04-27 18:25:52 -03:00
|
|
|
\input{libfnmatch}
|
1998-12-28 16:16:58 -04:00
|
|
|
\input{libshutil}
|
1997-11-20 17:04:27 -04:00
|
|
|
\input{liblocale}
|
2000-08-30 00:26:17 -03:00
|
|
|
\input{libgettext}
|
1995-03-02 08:38:39 -04:00
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libsomeos} % Optional Operating System Services
|
|
|
|
\input{libsignal}
|
|
|
|
\input{libsocket}
|
|
|
|
\input{libselect}
|
|
|
|
\input{libthread}
|
1998-07-20 14:34:50 -03:00
|
|
|
\input{libthreading}
|
2000-10-10 13:46:36 -03:00
|
|
|
\input{libmutex}
|
1997-11-20 15:54:16 -04:00
|
|
|
\input{libqueue}
|
2000-09-05 10:49:30 -03:00
|
|
|
\input{libmmap}
|
1997-04-03 18:41:49 -04:00
|
|
|
\input{libanydbm}
|
1999-04-15 12:11:40 -03:00
|
|
|
\input{libdbhash}
|
1997-04-03 18:41:49 -04:00
|
|
|
\input{libwhichdb}
|
1999-04-19 18:21:28 -03:00
|
|
|
\input{libbsddb}
|
1997-04-30 16:40:10 -03:00
|
|
|
\input{libzlib}
|
1997-07-17 13:27:42 -03:00
|
|
|
\input{libgzip}
|
2000-03-31 13:51:10 -04:00
|
|
|
\input{libzipfile}
|
2000-07-06 01:47:25 -03:00
|
|
|
\input{libreadline}
|
1999-06-21 15:25:49 -03:00
|
|
|
\input{librlcompleter}
|
1994-08-01 09:22:53 -03:00
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libunix} % UNIX Specific Services
|
|
|
|
\input{libposix}
|
|
|
|
\input{libpwd}
|
|
|
|
\input{libgrp}
|
1996-04-10 13:18:20 -03:00
|
|
|
\input{libcrypt}
|
1999-07-01 17:39:59 -03:00
|
|
|
\input{libdl}
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libdbm}
|
1994-08-08 05:03:24 -03:00
|
|
|
\input{libgdbm}
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libtermios}
|
1999-06-23 14:29:02 -03:00
|
|
|
\input{libtty}
|
1999-06-29 15:12:22 -03:00
|
|
|
\input{libpty}
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libfcntl}
|
1999-06-21 15:25:49 -03:00
|
|
|
\input{libpipes}
|
1995-01-04 15:17:34 -04:00
|
|
|
\input{libposixfile}
|
1996-12-18 14:37:05 -04:00
|
|
|
\input{libresource}
|
1999-06-27 12:02:37 -03:00
|
|
|
\input{libnis}
|
1995-10-09 17:49:57 -03:00
|
|
|
\input{libsyslog}
|
1997-06-12 13:05:46 -03:00
|
|
|
\input{libcommands}
|
1994-08-01 09:22:53 -03:00
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libpdb} % The Python Debugger
|
|
|
|
|
|
|
|
\input{libprofile} % The Python Profiler
|
|
|
|
|
1998-08-07 12:58:31 -03:00
|
|
|
\input{internet} % Internet Protocols
|
2000-07-07 00:36:12 -03:00
|
|
|
\input{libwebbrowser}
|
1995-02-27 13:53:25 -04:00
|
|
|
\input{libcgi}
|
1995-03-22 11:48:46 -04:00
|
|
|
\input{liburllib}
|
|
|
|
\input{libhttplib}
|
1995-02-16 12:28:22 -04:00
|
|
|
\input{libftplib}
|
|
|
|
\input{libgopherlib}
|
1998-04-24 17:49:02 -03:00
|
|
|
\input{libpoplib}
|
1998-04-11 01:27:07 -03:00
|
|
|
\input{libimaplib}
|
1995-02-16 12:28:22 -04:00
|
|
|
\input{libnntplib}
|
1998-06-28 14:55:53 -03:00
|
|
|
\input{libsmtplib}
|
1999-03-15 11:44:18 -04:00
|
|
|
\input{libtelnetlib}
|
1995-02-16 12:28:22 -04:00
|
|
|
\input{liburlparse}
|
1998-08-07 12:58:31 -03:00
|
|
|
\input{libsocksvr}
|
|
|
|
\input{libbasehttp}
|
1999-06-14 16:49:50 -03:00
|
|
|
\input{libsimplehttp}
|
|
|
|
\input{libcgihttp}
|
2000-08-19 13:55:31 -03:00
|
|
|
\input{libcookie}
|
1999-07-02 11:27:03 -03:00
|
|
|
\input{libasyncore}
|
1998-08-07 12:58:31 -03:00
|
|
|
|
1999-06-25 15:54:30 -03:00
|
|
|
\input{netdata} % Internet Data Handling
|
1996-10-08 18:54:41 -03:00
|
|
|
\input{libformatter}
|
1995-03-22 11:48:46 -04:00
|
|
|
\input{librfc822}
|
|
|
|
\input{libmimetools}
|
1999-02-12 15:26:09 -04:00
|
|
|
\input{libmimewriter}
|
1998-06-28 14:55:53 -03:00
|
|
|
\input{libmultifile}
|
1998-02-19 14:29:18 -04:00
|
|
|
\input{libbinhex}
|
|
|
|
\input{libuu}
|
1995-08-29 08:30:24 -03:00
|
|
|
\input{libbinascii}
|
1996-08-19 19:58:03 -03:00
|
|
|
\input{libxdrlib}
|
1997-03-25 18:09:18 -04:00
|
|
|
\input{libmailcap}
|
1998-05-19 12:03:45 -03:00
|
|
|
\input{libmimetypes}
|
1997-04-27 18:25:52 -03:00
|
|
|
\input{libbase64}
|
|
|
|
\input{libquopri}
|
1997-06-02 14:35:51 -03:00
|
|
|
\input{libmailbox}
|
1999-03-15 11:44:18 -04:00
|
|
|
\input{libmhlib}
|
1997-07-30 19:05:07 -03:00
|
|
|
\input{libmimify}
|
1998-12-22 01:18:24 -04:00
|
|
|
\input{libnetrc}
|
2000-03-31 13:51:10 -04:00
|
|
|
\input{librobotparser}
|
1995-02-16 12:28:22 -04:00
|
|
|
|
2000-07-04 23:24:39 -03:00
|
|
|
\input{markup} % Structured Markup Processing Tools
|
|
|
|
\input{libsgmllib}
|
|
|
|
\input{libhtmllib}
|
|
|
|
\input{libpyexpat}
|
2000-09-19 23:54:58 -03:00
|
|
|
\input{xmlsax}
|
2000-10-12 17:07:09 -03:00
|
|
|
\input{xmlsaxhandler}
|
|
|
|
\input{xmlsaxutils}
|
|
|
|
\input{xmlsaxreader}
|
2000-10-09 15:11:24 -03:00
|
|
|
\input{libxmllib}
|
2000-07-04 23:24:39 -03:00
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libmm} % Multimedia Services
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libaudioop}
|
|
|
|
\input{libimageop}
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libaifc}
|
1999-06-23 10:34:22 -03:00
|
|
|
\input{libsunau}
|
1999-06-17 12:12:16 -03:00
|
|
|
\input{libwave}
|
1999-06-22 15:50:06 -03:00
|
|
|
\input{libchunk}
|
1999-04-19 18:21:28 -03:00
|
|
|
\input{libcolorsys}
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{librgbimg}
|
1996-08-19 19:58:03 -03:00
|
|
|
\input{libimghdr}
|
1999-01-05 19:09:12 -04:00
|
|
|
\input{libsndhdr}
|
1994-08-01 09:22:53 -03:00
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libcrypto} % Cryptographic Services
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libmd5}
|
1999-04-23 18:52:18 -03:00
|
|
|
\input{libsha}
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libmpz}
|
|
|
|
\input{librotor}
|
|
|
|
|
2000-08-03 18:18:18 -03: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 09:22:53 -03:00
|
|
|
%\input{libamoeba} % AMOEBA ONLY
|
|
|
|
|
1997-06-02 14:35:51 -03:00
|
|
|
%\input{libstdwin} % STDWIN ONLY
|
1994-08-01 09:22:53 -03:00
|
|
|
|
|
|
|
\input{libsgi} % SGI IRIX ONLY
|
|
|
|
\input{libal}
|
1995-03-28 07:56:52 -04:00
|
|
|
\input{libcd}
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libfl}
|
|
|
|
\input{libfm}
|
|
|
|
\input{libgl}
|
|
|
|
\input{libimgfile}
|
1999-01-20 11:55:20 -04:00
|
|
|
\input{libjpeg}
|
1994-08-01 09:22:53 -03:00
|
|
|
%\input{libpanel}
|
|
|
|
|
|
|
|
\input{libsun} % SUNOS ONLY
|
1998-02-19 14:59:48 -04:00
|
|
|
\input{libsunaudio}
|
1994-08-01 09:22:53 -03:00
|
|
|
|
1999-02-16 15:18:38 -04:00
|
|
|
\input{windows} % MS Windows ONLY
|
|
|
|
\input{libmsvcrt}
|
2000-06-07 01:07:48 -03:00
|
|
|
\input{libwinreg}
|
1999-02-16 15:18:38 -04:00
|
|
|
\input{libwinsound}
|
|
|
|
|
2000-09-21 18:35:22 -03:00
|
|
|
\appendix
|
1997-03-14 00:12:52 -04:00
|
|
|
\input{libundoc}
|
2000-09-21 18:35:22 -03:00
|
|
|
\chapter{Reporting Bugs}
|
|
|
|
\input{reportingbugs}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-03-17 02:23:13 -04: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-01 22:59:09 -04:00
|
|
|
\renewcommand{\indexname}{Module Index}
|
1998-03-17 02:23:13 -04:00
|
|
|
%end{latexonly}
|
|
|
|
\input{modlib.ind} % Module Index
|
1998-01-01 22:59:09 -04:00
|
|
|
|
1998-03-17 02:23:13 -04:00
|
|
|
%begin{latexonly}
|
1998-01-01 22:59:09 -04:00
|
|
|
\renewcommand{\indexname}{Index}
|
1998-03-17 02:23:13 -04:00
|
|
|
%end{latexonly}
|
|
|
|
\input{lib.ind} % Index
|
1991-01-22 07:45:29 -04:00
|
|
|
|
|
|
|
\end{document}
|