blob: eaedd4e67e7ca74addb3824cad0d2ac295f2ab52 [file] [log] [blame]
Guido van Rossum515834a1991-01-22 11:45:29 +00001% Format this file with latex.
2
Guido van Rossum19f1b821991-11-12 15:41:57 +00003\documentstyle[myformat]{report} % To preview with xdvi
4
Guido van Rossum1230c081992-01-07 16:40:44 +00005% Underscores are not magic throughout this document
6\catcode`_=12
7
8% Dummy \cbstart and \cbend so I can leave the changebars in...
Guido van Rossum19f1b821991-11-12 15:41:57 +00009\newcommand{\cbstart}{}
10\newcommand{\cbend}{}
Guido van Rossum515834a1991-01-22 11:45:29 +000011
Guido van Rossum1230c081992-01-07 16:40:44 +000012% Define \itembreak: force the text after an item to start on a new line
Guido van Rossumd38b7641991-01-25 13:26:13 +000013\newcommand{\itembreak}{
Guido van Rossum1230c081992-01-07 16:40:44 +000014\mbox{}
15\\*[0mm]
Guido van Rossumd38b7641991-01-25 13:26:13 +000016}
Guido van Rossum515834a1991-01-22 11:45:29 +000017
Guido van Rossum1c462ad1992-01-16 17:36:16 +000018% Command to generate two index entries (using subentries)
19\newcommand{\indexii}[2]{
20\index{#1!#2}
21\index{#2!#1}
22}
23
24% And three entries (using only one level of subentries)
25\newcommand{\indexiii}[3]{
26\index{#1!#2 #3}
27\index{#2!#3, #1}
28\index{#3!#1 #2}
29}
30
31% And four (again, using only one level of subentries)
32\newcommand{\indexiv}[4]{
33\index{#1!#2 #3 #4}
34\index{#2!#3 #4, #1}
35\index{#3!#4, #1 #2}
36\index{#4!#1 #2 #3}
37}
38
39% Command to generate a reference to a function, statement, keyword, operator
40\newcommand{\stindex}[1]{\indexii{statement}{#1@{\tt#1}}}
41\newcommand{\kwindex}[1]{\indexii{keyword}{#1@{\tt#1}}}
42\newcommand{\opindex}[1]{\indexii{operator}{#1@{\tt#1}}}
43\newcommand{\bifuncindex}[1]{\index{#1@{\tt#1} (built-in function)}}
44
45% Add an index entry for a module
46\newcommand{\modindex}[2]{\index{#1@{\tt#1} (#2module)}}
47\newcommand{\bimodindex}[1]{\modindex{#1}{built-in }}
48\newcommand{\stmodindex}[1]{\modindex{#1}{standard }}
49
50% Additional string for an index entry
51\newcommand{\indexsubitem}{}
52\newcommand{\ttindex}[1]{\index{#1@{\tt#1} \indexsubitem}}
53
Guido van Rossum1230c081992-01-07 16:40:44 +000054% Define \itemjoin: some negative vspace to join two items together
55\newcommand{\itemjoin}{
56\mbox{}
57\vspace{-\itemsep}
58\vspace{-\parsep}
59}
Guido van Rossum8ec63501991-02-19 12:53:17 +000060
Guido van Rossum1230c081992-01-07 16:40:44 +000061% Define \funcitem{func}{args}: define a function item
62\newcommand{\funcitem}[2]{
Guido van Rossum1c462ad1992-01-16 17:36:16 +000063\ttindex{#1}
Guido van Rossum1230c081992-01-07 16:40:44 +000064\item[{\tt #1(#2)}]
65\
66}
Guido van Rossuma9d5c221991-04-23 14:11:26 +000067
Guido van Rossum1230c081992-01-07 16:40:44 +000068% Define \dataitem{name}: define a data item
69\newcommand{\dataitem}[1]{
Guido van Rossum1c462ad1992-01-16 17:36:16 +000070\ttindex{#1}
Guido van Rossum1230c081992-01-07 16:40:44 +000071\item[{\tt #1}]
72\
73}
74
75% Define \excitem{name}{string}: define an exception item
Guido van Rossum8ec63501991-02-19 12:53:17 +000076\newcommand{\excitem}[2]{
Guido van Rossum1c462ad1992-01-16 17:36:16 +000077\ttindex{#1}
Guido van Rossum1230c081992-01-07 16:40:44 +000078\item[{\tt #1 = '#2'}]
Guido van Rossum8ec63501991-02-19 12:53:17 +000079\itembreak
80}
81
Guido van Rossum515834a1991-01-22 11:45:29 +000082\title{\bf
Guido van Rossuma9d5c221991-04-23 14:11:26 +000083 Python Library Reference
Guido van Rossum515834a1991-01-22 11:45:29 +000084}
85
86\author{
87 Guido van Rossum \\
88 Dept. CST, CWI, Kruislaan 413 \\
89 1098 SJ Amsterdam, The Netherlands \\
90 E-mail: {\tt guido@cwi.nl}
91}
92
Guido van Rossum1c462ad1992-01-16 17:36:16 +000093% Tell \index to actually write the .idx file
Guido van Rossum1230c081992-01-07 16:40:44 +000094\makeindex
95
Guido van Rossum515834a1991-01-22 11:45:29 +000096\begin{document}
97
98\pagenumbering{roman}
99
100\maketitle
101
102\begin{abstract}
103
104\noindent
Guido van Rossum481ae681991-11-25 17:28:03 +0000105This document describes the built-in types, exceptions and functions
106and the standard modules that come with the Python system. It assumes
107basic knowledge about the Python language. For an informal
108introduction to the language, see the {\em Python Tutorial}. The {\em
109Python Reference Manual} gives a more formal definition of the
110language.
Guido van Rossum515834a1991-01-22 11:45:29 +0000111
112\end{abstract}
113
114\pagebreak
115
116\tableofcontents
117
118\pagebreak
119
120\pagenumbering{arabic}
121
Guido van Rossum19f1b821991-11-12 15:41:57 +0000122\input{lib1.tex} % intro; built-in types, functions and exceptions
123\input{lib2.tex} % built-in modules
124\input{lib3.tex} % standard modules
Guido van Rossum1230c081992-01-07 16:40:44 +0000125\input{lib4.tex} % OS-dependent chapters
126\input{lib5.tex} % Graphics chapters
Guido van Rossum1c462ad1992-01-16 17:36:16 +0000127\input{lib.ind} % The index
Guido van Rossum515834a1991-01-22 11:45:29 +0000128
129\end{document}