386 lines
8.8 KiB
TeX
386 lines
8.8 KiB
TeX
\documentclass{manual}
|
|
|
|
% 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.
|
|
|
|
\title{Python Library Reference}
|
|
|
|
\input{boilerplate}
|
|
|
|
\makeindex % tell \index to actually write the
|
|
% .idx file
|
|
\makemodindex % ... and the module index as well.
|
|
|
|
|
|
\begin{document}
|
|
|
|
\maketitle
|
|
|
|
\ifhtml
|
|
\chapter*{Front Matter\label{front}}
|
|
\fi
|
|
|
|
\input{copyright}
|
|
|
|
\begin{abstract}
|
|
|
|
\noindent
|
|
Python is an extensible, interpreted, object-oriented programming
|
|
language. It supports a wide range of applications, from simple text
|
|
processing scripts to interactive Web browsers.
|
|
|
|
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.
|
|
|
|
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
|
|
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.
|
|
|
|
\end{abstract}
|
|
|
|
\tableofcontents
|
|
|
|
% Chapter title:
|
|
|
|
\input{libintro} % Introduction
|
|
|
|
\input{libobjs} % Built-in Types, Exceptions and Functions
|
|
\input{libfuncs}
|
|
\input{libstdtypes}
|
|
\input{libexcs}
|
|
\input{libconsts}
|
|
|
|
\input{libpython} % Python Runtime Services
|
|
\input{libsys}
|
|
\input{libgc}
|
|
\input{libweakref}
|
|
\input{libfpectl}
|
|
\input{libatexit}
|
|
\input{libtypes}
|
|
\input{libuserdict}
|
|
\input{liboperator}
|
|
\input{libinspect}
|
|
\input{libtraceback}
|
|
\input{liblinecache}
|
|
\input{libpickle}
|
|
\input{libcopyreg} % really copy_reg
|
|
\input{libshelve}
|
|
\input{libcopy}
|
|
\input{libmarshal}
|
|
\input{libwarnings}
|
|
\input{libimp}
|
|
\input{libzipimport}
|
|
\input{libpkgutil}
|
|
\input{libmodulefinder}
|
|
\input{libcode}
|
|
\input{libcodeop}
|
|
\input{libpprint}
|
|
\input{librepr}
|
|
\input{libnew}
|
|
\input{libsite}
|
|
\input{libuser}
|
|
\input{libbltin} % really __builtin__
|
|
\input{libmain} % really __main__
|
|
\input{libfuture} % really __future__
|
|
|
|
\input{libstrings} % String Services
|
|
\input{libstring}
|
|
\input{libre}
|
|
\input{libreconvert}
|
|
\input{libstruct}
|
|
\input{libdifflib}
|
|
\input{libfpformat}
|
|
\input{libstringio}
|
|
\input{libtextwrap}
|
|
\input{libcodecs}
|
|
\input{libunicodedata}
|
|
\input{libstringprep}
|
|
|
|
\input{libmisc} % Miscellaneous Services
|
|
\input{libpydoc}
|
|
\input{libdoctest}
|
|
\input{libunittest}
|
|
\input{libtest}
|
|
\input{libdecimal}
|
|
\input{libmath}
|
|
\input{libcmath}
|
|
\input{librandom}
|
|
\input{libbisect}
|
|
\input{libcollections}
|
|
\input{libheapq}
|
|
\input{libarray}
|
|
\input{libsets}
|
|
\input{libitertools}
|
|
\input{libfunctional}
|
|
\input{libcfgparser}
|
|
\input{libfileinput}
|
|
\input{libcalendar}
|
|
\input{libcmd}
|
|
\input{libshlex}
|
|
|
|
\input{liballos} % Generic Operating System Services
|
|
\input{libos}
|
|
\input{libposixpath} % os.path
|
|
\input{libdircache}
|
|
\input{libstat}
|
|
\input{libstatvfs}
|
|
\input{libfilecmp}
|
|
\input{libsubprocess}
|
|
\input{libpopen2}
|
|
\input{libdatetime}
|
|
\input{libtime}
|
|
\input{libsched}
|
|
\input{libmutex}
|
|
\input{libgetpass}
|
|
\input{libcurses}
|
|
\input{libascii} % curses.ascii
|
|
\input{libcursespanel}
|
|
\input{libgetopt}
|
|
\input{liboptparse}
|
|
\input{libtempfile}
|
|
\input{liberrno}
|
|
\input{libglob}
|
|
\input{libfnmatch}
|
|
\input{libshutil}
|
|
\input{liblocale}
|
|
\input{libgettext}
|
|
\input{liblogging}
|
|
\input{libplatform}
|
|
|
|
\input{libsomeos} % Optional Operating System Services
|
|
\input{libsignal}
|
|
\input{libsocket}
|
|
\input{libselect}
|
|
\input{libthread}
|
|
\input{libthreading}
|
|
\input{libdummythread}
|
|
\input{libdummythreading}
|
|
\input{libqueue}
|
|
\input{libmmap}
|
|
\input{libanydbm}
|
|
\input{libdbhash}
|
|
\input{libwhichdb}
|
|
\input{libbsddb}
|
|
\input{libdumbdbm}
|
|
\input{libzlib}
|
|
\input{libgzip}
|
|
\input{libbz2}
|
|
\input{libzipfile}
|
|
\input{libtarfile}
|
|
\input{libreadline}
|
|
\input{librlcompleter}
|
|
|
|
\input{libunix} % UNIX Specific Services
|
|
\input{libposix}
|
|
\input{libpwd}
|
|
\input{libspwd}
|
|
\input{libgrp}
|
|
\input{libcrypt}
|
|
\input{libdl}
|
|
\input{libdbm}
|
|
\input{libgdbm}
|
|
\input{libtermios}
|
|
\input{libtty}
|
|
\input{libpty}
|
|
\input{libfcntl}
|
|
\input{libpipes}
|
|
\input{libposixfile}
|
|
\input{libresource}
|
|
\input{libnis}
|
|
\input{libsyslog}
|
|
\input{libcommands}
|
|
|
|
\input{libpdb} % The Python Debugger
|
|
|
|
\input{libprofile} % The Python Profiler
|
|
\input{libhotshot} % New profiler
|
|
\input{libtimeit}
|
|
|
|
\input{internet} % Internet Protocols
|
|
\input{libwebbrowser}
|
|
\input{libcgi}
|
|
\input{libcgitb}
|
|
\input{liburllib}
|
|
\input{liburllib2}
|
|
\input{libhttplib}
|
|
\input{libftplib}
|
|
\input{libgopherlib}
|
|
\input{libpoplib}
|
|
\input{libimaplib}
|
|
\input{libnntplib}
|
|
\input{libsmtplib}
|
|
\input{libsmtpd}
|
|
\input{libtelnetlib}
|
|
\input{liburlparse}
|
|
\input{libsocksvr}
|
|
\input{libbasehttp}
|
|
\input{libsimplehttp}
|
|
\input{libcgihttp}
|
|
\input{libcookielib}
|
|
\input{libcookie}
|
|
\input{libxmlrpclib}
|
|
\input{libsimplexmlrpc}
|
|
\input{libdocxmlrpc}
|
|
\input{libasyncore}
|
|
\input{libasynchat}
|
|
|
|
\input{netdata} % Internet Data Handling
|
|
\input{libformatter}
|
|
|
|
% MIME & email stuff
|
|
\input{email}
|
|
\input{libmailcap}
|
|
\input{libmailbox}
|
|
\input{libmhlib}
|
|
\input{libmimetools}
|
|
\input{libmimetypes}
|
|
\input{libmimewriter}
|
|
\input{libmimify}
|
|
\input{libmultifile}
|
|
\input{librfc822}
|
|
|
|
% encoding stuff
|
|
\input{libbase64}
|
|
\input{libbinascii}
|
|
\input{libbinhex}
|
|
\input{libquopri}
|
|
\input{libuu}
|
|
\input{libxdrlib}
|
|
|
|
% file formats
|
|
\input{libnetrc}
|
|
\input{librobotparser}
|
|
\input{libcsv}
|
|
|
|
\input{markup} % Structured Markup Processing Tools
|
|
\input{libhtmlparser}
|
|
\input{libsgmllib}
|
|
\input{libhtmllib}
|
|
\input{libpyexpat}
|
|
\input{xmldom}
|
|
\input{xmldomminidom}
|
|
\input{xmldompulldom}
|
|
\input{xmlsax}
|
|
\input{xmlsaxhandler}
|
|
\input{xmlsaxutils}
|
|
\input{xmlsaxreader}
|
|
% \input{libxmllib}
|
|
|
|
\input{libmm} % Multimedia Services
|
|
\input{libaudioop}
|
|
\input{libimageop}
|
|
\input{libaifc}
|
|
\input{libsunau}
|
|
\input{libwave}
|
|
\input{libchunk}
|
|
\input{libcolorsys}
|
|
\input{librgbimg}
|
|
\input{libimghdr}
|
|
\input{libsndhdr}
|
|
\input{libossaudiodev}
|
|
|
|
\input{libcrypto} % Cryptographic Services
|
|
\input{libhmac}
|
|
\input{libmd5}
|
|
\input{libsha}
|
|
|
|
\input{tkinter}
|
|
|
|
\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}
|
|
\input{libpickletools}
|
|
\input{distutils}
|
|
|
|
\input{compiler} % compiler package
|
|
|
|
%\input{libamoeba} % AMOEBA ONLY
|
|
|
|
%\input{libstdwin} % STDWIN ONLY
|
|
|
|
\input{libsgi} % SGI IRIX ONLY
|
|
\input{libal}
|
|
\input{libcd}
|
|
\input{libfl}
|
|
\input{libfm}
|
|
\input{libgl}
|
|
\input{libimgfile}
|
|
\input{libjpeg}
|
|
%\input{libpanel}
|
|
|
|
\input{libsun} % SUNOS ONLY
|
|
\input{libsunaudio}
|
|
|
|
\input{windows} % MS Windows ONLY
|
|
\input{libmsvcrt}
|
|
\input{libwinreg}
|
|
\input{libwinsound}
|
|
|
|
\appendix
|
|
\input{libundoc}
|
|
|
|
%\chapter{Obsolete Modules}
|
|
%\input{libcmpcache}
|
|
%\input{libcmp}
|
|
%\input{libni}
|
|
%\input{libregex}
|
|
%\input{libregsub}
|
|
|
|
\chapter{Reporting Bugs}
|
|
\input{reportingbugs}
|
|
|
|
\chapter{History and License}
|
|
\input{license}
|
|
|
|
%
|
|
% The ugly "%begin{latexonly}" pseudo-environments are really just to
|
|
% keep LaTeX2HTML quiet during the \renewcommand{} macros; they're
|
|
% not really valuable.
|
|
%
|
|
|
|
%begin{latexonly}
|
|
\renewcommand{\indexname}{Module Index}
|
|
%end{latexonly}
|
|
\input{modlib.ind} % Module Index
|
|
|
|
%begin{latexonly}
|
|
\renewcommand{\indexname}{Index}
|
|
%end{latexonly}
|
|
\input{lib.ind} % Index
|
|
|
|
\end{document}
|