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.
|
|
|
|
|
1997-12-18 11:56:05 -04:00
|
|
|
While the \emph{Python Reference Manual} describes the exact syntax and
|
1995-03-30 12:01:33 -04:00
|
|
|
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.
|
|
|
|
|
|
|
|
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
|
1997-12-18 11:56:05 -04:00
|
|
|
informal introduction to Python, see the \emph{Python Tutorial}; the
|
1998-01-16 12:34:34 -04:00
|
|
|
\emph{Python Reference Manual} remains the highest authority on
|
|
|
|
syntactic and semantic questions. Finally, the manual entitled
|
|
|
|
\emph{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}
|
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libpython} % Python Services
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libsys}
|
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}
|
|
|
|
\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}
|
1995-10-11 14:32:29 -03:00
|
|
|
\input{libparser}
|
1998-02-18 11:59:13 -04:00
|
|
|
\input{libsymbol}
|
|
|
|
\input{libtoken}
|
1997-10-06 18:40:48 -03:00
|
|
|
\input{libkeyword}
|
1999-02-18 16:40:26 -04:00
|
|
|
\input{libtokenize}
|
|
|
|
\input{libpyclbr}
|
1997-07-18 18:08:07 -03:00
|
|
|
\input{libcode}
|
1997-10-06 18:26:03 -03:00
|
|
|
\input{libpprint}
|
1999-01-27 13:20:33 -04:00
|
|
|
\input{librepr}
|
1998-08-11 12:47:16 -03:00
|
|
|
\input{libpycompile} % really py_compile
|
|
|
|
\input{libcompileall}
|
1997-11-18 11:11:47 -04:00
|
|
|
\input{libdis}
|
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}
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libregex}
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libregsub}
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libstruct}
|
1998-07-24 10:56:11 -03:00
|
|
|
\input{libstringio}
|
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}
|
1994-08-01 09:22:53 -03:00
|
|
|
\input{libwhrandom}
|
1997-04-03 18:41:49 -04:00
|
|
|
\input{librandom}
|
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
|
1995-03-28 09:35:14 -04:00
|
|
|
\input{libtime}
|
1998-12-22 19:37:46 -04:00
|
|
|
\input{libgetpass}
|
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}
|
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}
|
1997-11-20 15:54:16 -04:00
|
|
|
\input{libqueue}
|
1997-04-03 18:41:49 -04:00
|
|
|
\input{libanydbm}
|
|
|
|
\input{libwhichdb}
|
1997-04-30 16:40:10 -03:00
|
|
|
\input{libzlib}
|
1997-07-17 13:27:42 -03:00
|
|
|
\input{libgzip}
|
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}
|
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}
|
|
|
|
\input{libfcntl}
|
1995-01-04 15:17:34 -04:00
|
|
|
\input{libposixfile}
|
1996-12-18 14:37:05 -04:00
|
|
|
\input{libresource}
|
1995-10-09 17:49:57 -03:00
|
|
|
\input{libsyslog}
|
1996-12-30 22:24:54 -04:00
|
|
|
\input{libstat}
|
1998-04-28 15:27:53 -03:00
|
|
|
\input{libpopen2}
|
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
|
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}
|
1995-02-16 12:28:22 -04:00
|
|
|
\input{liburlparse}
|
1998-08-07 12:58:31 -03:00
|
|
|
\input{libsocksvr}
|
|
|
|
\input{libbasehttp}
|
|
|
|
|
|
|
|
\input{netdata}
|
1995-03-22 11:48:46 -04:00
|
|
|
\input{libsgmllib}
|
1996-10-09 11:36:54 -03:00
|
|
|
\input{libhtmllib}
|
1997-11-18 11:11:47 -04:00
|
|
|
\input{libxmllib}
|
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}
|
1997-07-30 19:05:07 -03:00
|
|
|
\input{libmimify}
|
1998-12-22 01:18:24 -04:00
|
|
|
\input{libnetrc}
|
1995-02-16 12:28:22 -04:00
|
|
|
|
1996-10-21 22:11:53 -03:00
|
|
|
\input{librestricted}
|
|
|
|
\input{librexec}
|
|
|
|
\input{libbastion}
|
|
|
|
|
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}
|
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}
|
|
|
|
\input{libmpz}
|
|
|
|
\input{librotor}
|
|
|
|
|
|
|
|
%\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}
|
|
|
|
\input{libwinsound}
|
|
|
|
|
1997-03-14 00:12:52 -04:00
|
|
|
\input{libundoc}
|
|
|
|
|
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}
|