blob: 0928f3e547c42e244e32bf4d6d3715ef55dcfb9b [file] [log] [blame]
Guido van Rossum9b573851992-01-29 14:46:35 +00001\documentstyle[myformat]{report}
Guido van Rossum19f1b821991-11-12 15:41:57 +00002
Guido van Rossum1230c081992-01-07 16:40:44 +00003% Underscores are not magic throughout this document
4\catcode`_=12
5
6% Dummy \cbstart and \cbend so I can leave the changebars in...
Guido van Rossum19f1b821991-11-12 15:41:57 +00007\newcommand{\cbstart}{}
8\newcommand{\cbend}{}
Guido van Rossum515834a1991-01-22 11:45:29 +00009
Guido van Rossum1230c081992-01-07 16:40:44 +000010% Define \itembreak: force the text after an item to start on a new line
Guido van Rossumd38b7641991-01-25 13:26:13 +000011\newcommand{\itembreak}{
Guido van Rossum1230c081992-01-07 16:40:44 +000012\mbox{}
13\\*[0mm]
Guido van Rossumd38b7641991-01-25 13:26:13 +000014}
Guido van Rossum515834a1991-01-22 11:45:29 +000015
Guido van Rossum1c462ad1992-01-16 17:36:16 +000016% Command to generate two index entries (using subentries)
17\newcommand{\indexii}[2]{
18\index{#1!#2}
19\index{#2!#1}
20}
21
22% And three entries (using only one level of subentries)
23\newcommand{\indexiii}[3]{
24\index{#1!#2 #3}
25\index{#2!#3, #1}
26\index{#3!#1 #2}
27}
28
29% And four (again, using only one level of subentries)
30\newcommand{\indexiv}[4]{
31\index{#1!#2 #3 #4}
32\index{#2!#3 #4, #1}
33\index{#3!#4, #1 #2}
34\index{#4!#1 #2 #3}
35}
36
37% Command to generate a reference to a function, statement, keyword, operator
38\newcommand{\stindex}[1]{\indexii{statement}{#1@{\tt#1}}}
39\newcommand{\kwindex}[1]{\indexii{keyword}{#1@{\tt#1}}}
40\newcommand{\opindex}[1]{\indexii{operator}{#1@{\tt#1}}}
41\newcommand{\bifuncindex}[1]{\index{#1@{\tt#1} (built-in function)}}
42
43% Add an index entry for a module
44\newcommand{\modindex}[2]{\index{#1@{\tt#1} (#2module)}}
45\newcommand{\bimodindex}[1]{\modindex{#1}{built-in }}
46\newcommand{\stmodindex}[1]{\modindex{#1}{standard }}
47
48% Additional string for an index entry
49\newcommand{\indexsubitem}{}
50\newcommand{\ttindex}[1]{\index{#1@{\tt#1} \indexsubitem}}
51
Guido van Rossum1230c081992-01-07 16:40:44 +000052% Define \itemjoin: some negative vspace to join two items together
53\newcommand{\itemjoin}{
54\mbox{}
55\vspace{-\itemsep}
56\vspace{-\parsep}
57}
Guido van Rossum8ec63501991-02-19 12:53:17 +000058
Guido van Rossum1230c081992-01-07 16:40:44 +000059% Define \funcitem{func}{args}: define a function item
60\newcommand{\funcitem}[2]{
Guido van Rossum1c462ad1992-01-16 17:36:16 +000061\ttindex{#1}
Guido van Rossum1230c081992-01-07 16:40:44 +000062\item[{\tt #1(#2)}]
63\
64}
Guido van Rossuma9d5c221991-04-23 14:11:26 +000065
Guido van Rossum1230c081992-01-07 16:40:44 +000066% Define \dataitem{name}: define a data item
67\newcommand{\dataitem}[1]{
Guido van Rossum1c462ad1992-01-16 17:36:16 +000068\ttindex{#1}
Guido van Rossum1230c081992-01-07 16:40:44 +000069\item[{\tt #1}]
70\
71}
72
Guido van Rossum9b573851992-01-29 14:46:35 +000073% Define \excitem{name}: define an exception item
74\newcommand{\excitem}[1]{
Guido van Rossum1c462ad1992-01-16 17:36:16 +000075\ttindex{#1}
Guido van Rossum9b573851992-01-29 14:46:35 +000076\item[{\tt #1}]
Guido van Rossum8ec63501991-02-19 12:53:17 +000077\itembreak
78}
79
Guido van Rossum515834a1991-01-22 11:45:29 +000080\title{\bf
Guido van Rossuma9d5c221991-04-23 14:11:26 +000081 Python Library Reference
Guido van Rossum515834a1991-01-22 11:45:29 +000082}
83
84\author{
85 Guido van Rossum \\
86 Dept. CST, CWI, Kruislaan 413 \\
87 1098 SJ Amsterdam, The Netherlands \\
88 E-mail: {\tt guido@cwi.nl}
89}
90
Guido van Rossum1c462ad1992-01-16 17:36:16 +000091% Tell \index to actually write the .idx file
Guido van Rossum1230c081992-01-07 16:40:44 +000092\makeindex
93
Guido van Rossum515834a1991-01-22 11:45:29 +000094\begin{document}
95
96\pagenumbering{roman}
97
98\maketitle
99
100\begin{abstract}
101
102\noindent
Guido van Rossum481ae681991-11-25 17:28:03 +0000103This document describes the built-in types, exceptions and functions
104and the standard modules that come with the Python system. It assumes
105basic knowledge about the Python language. For an informal
106introduction to the language, see the {\em Python Tutorial}. The {\em
107Python Reference Manual} gives a more formal definition of the
108language.
Guido van Rossum515834a1991-01-22 11:45:29 +0000109
110\end{abstract}
111
112\pagebreak
113
Guido van Rossum9b573851992-01-29 14:46:35 +0000114{
115\parskip = 0mm
Guido van Rossum515834a1991-01-22 11:45:29 +0000116\tableofcontents
Guido van Rossum9b573851992-01-29 14:46:35 +0000117}
Guido van Rossum515834a1991-01-22 11:45:29 +0000118
119\pagebreak
120
121\pagenumbering{arabic}
122
Guido van Rossum19f1b821991-11-12 15:41:57 +0000123\input{lib1.tex} % intro; built-in types, functions and exceptions
124\input{lib2.tex} % built-in modules
125\input{lib3.tex} % standard modules
Guido van Rossum1230c081992-01-07 16:40:44 +0000126\input{lib4.tex} % OS-dependent chapters
127\input{lib5.tex} % Graphics chapters
Guido van Rossum1c462ad1992-01-16 17:36:16 +0000128\input{lib.ind} % The index
Guido van Rossum515834a1991-01-22 11:45:29 +0000129
130\end{document}