1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
% Format this file with latex.
\documentstyle[myformat]{report} % To preview with xdvi
% Underscores are not magic throughout this document
\catcode`_=12
% Dummy \cbstart and \cbend so I can leave the changebars in...
\newcommand{\cbstart}{}
\newcommand{\cbend}{}
% Define \itembreak: force the text after an item to start on a new line
\newcommand{\itembreak}{
\mbox{}
\\*[0mm]
}
% Command to generate two index entries (using subentries)
\newcommand{\indexii}[2]{
\index{#1!#2}
\index{#2!#1}
}
% And three entries (using only one level of subentries)
\newcommand{\indexiii}[3]{
\index{#1!#2 #3}
\index{#2!#3, #1}
\index{#3!#1 #2}
}
% And four (again, using only one level of subentries)
\newcommand{\indexiv}[4]{
\index{#1!#2 #3 #4}
\index{#2!#3 #4, #1}
\index{#3!#4, #1 #2}
\index{#4!#1 #2 #3}
}
% Command to generate a reference to a function, statement, keyword, operator
\newcommand{\stindex}[1]{\indexii{statement}{#1@{\tt#1}}}
\newcommand{\kwindex}[1]{\indexii{keyword}{#1@{\tt#1}}}
\newcommand{\opindex}[1]{\indexii{operator}{#1@{\tt#1}}}
\newcommand{\bifuncindex}[1]{\index{#1@{\tt#1} (built-in function)}}
% Add an index entry for a module
\newcommand{\modindex}[2]{\index{#1@{\tt#1} (#2module)}}
\newcommand{\bimodindex}[1]{\modindex{#1}{built-in }}
\newcommand{\stmodindex}[1]{\modindex{#1}{standard }}
% Additional string for an index entry
\newcommand{\indexsubitem}{}
\newcommand{\ttindex}[1]{\index{#1@{\tt#1} \indexsubitem}}
% Define \itemjoin: some negative vspace to join two items together
\newcommand{\itemjoin}{
\mbox{}
\vspace{-\itemsep}
\vspace{-\parsep}
}
% Define \funcitem{func}{args}: define a function item
\newcommand{\funcitem}[2]{
\ttindex{#1}
\item[{\tt #1(#2)}]
\
}
% Define \dataitem{name}: define a data item
\newcommand{\dataitem}[1]{
\ttindex{#1}
\item[{\tt #1}]
\
}
% Define \excitem{name}{string}: define an exception item
\newcommand{\excitem}[2]{
\ttindex{#1}
\item[{\tt #1 = '#2'}]
\itembreak
}
\title{\bf
Python Library Reference
}
\author{
Guido van Rossum \\
Dept. CST, CWI, Kruislaan 413 \\
1098 SJ Amsterdam, The Netherlands \\
E-mail: {\tt guido@cwi.nl}
}
% Tell \index to actually write the .idx file
\makeindex
\begin{document}
\pagenumbering{roman}
\maketitle
\begin{abstract}
\noindent
This document describes the built-in types, exceptions and functions
and the standard modules that come with the Python system. It assumes
basic knowledge about the Python language. For an informal
introduction to the language, see the {\em Python Tutorial}. The {\em
Python Reference Manual} gives a more formal definition of the
language.
\end{abstract}
\pagebreak
\tableofcontents
\pagebreak
\pagenumbering{arabic}
\input{lib1.tex} % intro; built-in types, functions and exceptions
\input{lib2.tex} % built-in modules
\input{lib3.tex} % standard modules
\input{lib4.tex} % OS-dependent chapters
\input{lib5.tex} % Graphics chapters
\input{lib.ind} % The index
\end{document}
|