annotate Doc/lib/libpdb.tex @ 5817:48b94de85bf3 legacy-trunk

Extensive changes by AMK.
author Guido van Rossum <guido@python.org>
date Thu, 17 Jul 1997 16:29:42 +0000
parents b7649491ae92
children 3468ea8645ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
1 \chapter{The Python Debugger}
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 \stmodindex{pdb}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
3 \index{debugging}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
4
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
5 \renewcommand{\indexsubitem}{(in module pdb)}
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
6
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
7 The module \code{pdb} defines an interactive source code debugger for
5768
7de59f47e85b Added (minimal) doc for conditional breakpoints.
Guido van Rossum <guido@python.org>
parents: 5679
diff changeset
8 Python programs. It supports setting
7de59f47e85b Added (minimal) doc for conditional breakpoints.
Guido van Rossum <guido@python.org>
parents: 5679
diff changeset
9 (conditional) breakpoints and single stepping
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
10 at the source line level, inspection of stack frames, source code
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
11 listing, and evaluation of arbitrary Python code in the context of any
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
12 stack frame. It also supports post-mortem debugging and can be called
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
13 under program control.
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
14
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
15 The debugger is extensible --- it is actually defined as a class
2629
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
16 \code{Pdb}. This is currently undocumented but easily understood by
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
17 reading the source. The extension interface uses the (also
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
18 undocumented) modules \code{bdb} and \code{cmd}.
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
19 \ttindex{Pdb}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
20 \ttindex{bdb}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
21 \ttindex{cmd}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
22
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
23 A primitive windowing version of the debugger also exists --- this is
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
24 module \code{wdb}, which requires STDWIN (see the chapter on STDWIN
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
25 specific modules).
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
26 \index{stdwin}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
27 \ttindex{wdb}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
28
2629
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
29 The debugger's prompt is ``\code{(Pdb) }''.
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
30 Typical usage to run a program under control of the debugger is:
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
31
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
32 \begin{verbatim}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
33 >>> import pdb
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
34 >>> import mymodule
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
35 >>> pdb.run('mymodule.test()')
2629
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
36 > <string>(0)?()
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
37 (Pdb) continue
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
38 > <string>(1)?()
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
39 (Pdb) continue
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
40 NameError: 'spam'
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
41 > <string>(1)?()
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
42 (Pdb)
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
43 \end{verbatim}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
44
5679
d5911ca8d4eb Mention use of pdb.py to run a script (AMK).
Guido van Rossum <guido@python.org>
parents: 2629
diff changeset
45 \code{pdb.py} can also be invoked as
d5911ca8d4eb Mention use of pdb.py to run a script (AMK).
Guido van Rossum <guido@python.org>
parents: 2629
diff changeset
46 a script to debug other scripts. For example:
d5911ca8d4eb Mention use of pdb.py to run a script (AMK).
Guido van Rossum <guido@python.org>
parents: 2629
diff changeset
47 \code{python /usr/local/lib/python1.4/pdb.py myscript.py}
d5911ca8d4eb Mention use of pdb.py to run a script (AMK).
Guido van Rossum <guido@python.org>
parents: 2629
diff changeset
48
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
49 Typical usage to inspect a crashed program is:
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
50
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
51 \begin{verbatim}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
52 >>> import pdb
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
53 >>> import mymodule
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
54 >>> mymodule.test()
2629
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
55 Traceback (innermost last):
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
56 File "<stdin>", line 1, in ?
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
57 File "./mymodule.py", line 4, in test
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
58 test2()
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
59 File "./mymodule.py", line 3, in test2
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
60 print spam
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
61 NameError: spam
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
62 >>> pdb.pm()
2629
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
63 > ./mymodule.py(3)test2()
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
64 -> print spam
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
65 (Pdb)
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
66 \end{verbatim}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
67
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
68 The module defines the following functions; each enters the debugger
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
69 in a slightly different way:
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
70
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
71 \begin{funcdesc}{run}{statement\optional{\, globals\optional{\, locals}}}
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
72 Execute the \var{statement} (given as a string) under debugger
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
73 control. The debugger prompt appears before any code is executed; you
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
74 can set breakpoints and type \code{continue}, or you can step through
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
75 the statement using \code{step} or \code{next} (all these commands are
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
76 explained below). The optional \var{globals} and \var{locals}
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
77 arguments specify the environment in which the code is executed; by
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
78 default the dictionary of the module \code{__main__} is used. (See
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
79 the explanation of the \code{exec} statement or the \code{eval()}
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
80 built-in function.)
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
81 \end{funcdesc}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
82
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
83 \begin{funcdesc}{runeval}{expression\optional{\, globals\optional{\, locals}}}
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
84 Evaluate the \var{expression} (given as a a string) under debugger
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
85 control. When \code{runeval()} returns, it returns the value of the
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
86 expression. Otherwise this function is similar to
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
87 \code{run()}.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
88 \end{funcdesc}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
89
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
90 \begin{funcdesc}{runcall}{function\optional{\, argument\, ...}}
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
91 Call the \var{function} (a function or method object, not a string)
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
92 with the given arguments. When \code{runcall()} returns, it returns
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
93 whatever the function call returned. The debugger prompt appears as
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
94 soon as the function is entered.
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
95 \end{funcdesc}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
96
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
97 \begin{funcdesc}{set_trace}{}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
98 Enter the debugger at the calling stack frame. This is useful to
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
99 hard-code a breakpoint at a given point in a program, even if the code
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
100 is not otherwise being debugged (e.g. when an assertion fails).
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
101 \end{funcdesc}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
102
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
103 \begin{funcdesc}{post_mortem}{traceback}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
104 Enter post-mortem debugging of the given \var{traceback} object.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
105 \end{funcdesc}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
106
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
107 \begin{funcdesc}{pm}{}
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
108 Enter post-mortem debugging of the traceback found in
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
109 \code{sys.last_traceback}.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
110 \end{funcdesc}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
111
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
112 \section{Debugger Commands}
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
113
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
114 The debugger recognizes the following commands. Most commands can be
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
115 abbreviated to one or two letters; e.g. ``\code{h(elp)}'' means that
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
116 either ``\code{h}'' or ``\code{help}'' can be used to enter the help
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
117 command (but not ``\code{he}'' or ``\code{hel}'', nor ``\code{H}'' or
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
118 ``\code{Help} or ``\code{HELP}''). Arguments to commands must be
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
119 separated by whitespace (spaces or tabs). Optional arguments are
2491
fb8e08ec88dd changes (suggested) by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2464
diff changeset
120 enclosed in square brackets (``\code{[]}'') in the command syntax; the
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
121 square brackets must not be typed. Alternatives in the command syntax
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
122 are separated by a vertical bar (``\code{|}'').
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
123
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
124 Entering a blank line repeats the last command entered. Exception: if
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
125 the last command was a ``\code{list}'' command, the next 11 lines are
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
126 listed.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
127
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
128 Commands that the debugger doesn't recognize are assumed to be Python
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
129 statements and are executed in the context of the program being
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
130 debugged. Python statements can also be prefixed with an exclamation
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
131 point (``\code{!}''). This is a powerful way to inspect the program
2629
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
132 being debugged; it is even possible to change a variable or call a
175671cc21d8 more complete examples
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
133 function. When an
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
134 exception occurs in such a statement, the exception name is printed
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
135 but the debugger's state is not changed.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
136
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
137 \begin{description}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
138
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
139 \item[h(elp) [\var{command}]]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
140
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
141 Without argument, print the list of available commands.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
142 With a \var{command} as argument, print help about that command.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
143 ``\code{help pdb}'' displays the full documentation file; if the
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
144 environment variable \code{PAGER} is defined, the file is piped
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
145 through that command instead. Since the \var{command} argument must be
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
146 an identifier, ``\code{help exec}'' must be entered to get help on the
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
147 ``\code{!}'' command.
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
148
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
149 \item[w(here)]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
150
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
151 Print a stack trace, with the most recent frame at the bottom.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
152 An arrow indicates the current frame, which determines the
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
153 context of most commands.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
154
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
155 \item[d(own)]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
156
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
157 Move the current frame one level down in the stack trace
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
158 (to an older frame).
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
159
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
160 \item[u(p)]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
161
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
162 Move the current frame one level up in the stack trace
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
163 (to a newer frame).
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
164
5769
b7649491ae92 Oops, some clarifications to conditional breaks.
Guido van Rossum <guido@python.org>
parents: 5768
diff changeset
165 \item[b(reak) [\var{lineno}\code{|}\var{function}] [, "\var{condition}"]]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
166
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
167 With a \var{lineno} argument, set a break there in the current
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
168 file. With a \var{function} argument, set a break at the entry of
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
169 that function. Without argument, list all breaks.
5769
b7649491ae92 Oops, some clarifications to conditional breaks.
Guido van Rossum <guido@python.org>
parents: 5768
diff changeset
170 If a second argument is present, it is a string (included in string
b7649491ae92 Oops, some clarifications to conditional breaks.
Guido van Rossum <guido@python.org>
parents: 5768
diff changeset
171 quotes!) specifying an expression which must evaluate to true before
b7649491ae92 Oops, some clarifications to conditional breaks.
Guido van Rossum <guido@python.org>
parents: 5768
diff changeset
172 the breakpoint is honored.
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
173
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
174 \item[cl(ear) [\var{lineno}]]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
175
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
176 With a \var{lineno} argument, clear that break in the current file.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
177 Without argument, clear all breaks (but first ask confirmation).
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
178
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
179 \item[s(tep)]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
180
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
181 Execute the current line, stop at the first possible occasion
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
182 (either in a function that is called or on the next line in the
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
183 current function).
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
184
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
185 \item[n(ext)]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
186
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
187 Continue execution until the next line in the current function
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
188 is reached or it returns. (The difference between \code{next} and
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
189 \code{step} is that \code{step} stops inside a called function, while
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
190 \code{next} executes called functions at (nearly) full speed, only
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
191 stopping at the next line in the current function.)
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
192
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
193 \item[r(eturn)]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
194
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
195 Continue execution until the current function returns.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
196
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
197 \item[c(ont(inue))]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
198
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
199 Continue execution, only stop when a breakpoint is encountered.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
200
5768
7de59f47e85b Added (minimal) doc for conditional breakpoints.
Guido van Rossum <guido@python.org>
parents: 5679
diff changeset
201 \item[l(ist) [\var{first}] [, \var{last}]]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
202
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
203 List source code for the current file. Without arguments, list 11
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
204 lines around the current line or continue the previous listing. With
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
205 one argument, list 11 lines around at that line. With two arguments,
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
206 list the given range; if the second argument is less than the first,
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
207 it is interpreted as a count.
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
208
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
209 \item[a(rgs)]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
210
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
211 Print the argument list of the current function.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
212
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
213 \item[p \var{expression}]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
214
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
215 Evaluate the \var{expression} in the current context and print its
2464
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
216 value. (Note: \code{print} can also be used, but is not a debugger
e726f90d2a9f minor update
Guido van Rossum <guido@python.org>
parents: 2462
diff changeset
217 command --- this executes the Python \code{print} statement.)
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
218
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
219 \item[[!] \var{statement}]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
220
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
221 Execute the (one-line) \var{statement} in the context of
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
222 the current stack frame.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
223 The exclamation point can be omitted unless the first word
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
224 of the statement resembles a debugger command.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
225 To set a global variable, you can prefix the assignment
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
226 command with a ``\code{global}'' command on the same line, e.g.:
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
227 \begin{verbatim}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
228 (Pdb) global list_options; list_options = ['-l']
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
229 (Pdb)
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
230 \end{verbatim}
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
231
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
232 \item[q(uit)]
2462
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
233
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
234 Quit from the debugger.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
235 The program being executed is aborted.
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
236
e9e86ae5f5a4 small nits and new files
Guido van Rossum <guido@python.org>
parents:
diff changeset
237 \end{description}
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
238
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
239 \section{How It Works}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
240
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
241 Some changes were made to the interpreter:
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
242
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
243 \begin{itemize}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
244 \item sys.settrace(func) sets the global trace function
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
245 \item there can also a local trace function (see later)
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
246 \end{itemize}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
247
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
248 Trace functions have three arguments: (\var{frame}, \var{event}, \var{arg})
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
249
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
250 \begin{description}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
251
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
252 \item[\var{frame}] is the current stack frame
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
253
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
254 \item[\var{event}] is a string: \code{'call'}, \code{'line'}, \code{'return'}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
255 or \code{'exception'}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
256
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
257 \item[\var{arg}] is dependent on the event type
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
258
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
259 \end{description}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
260
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
261 A trace function should return a new trace function or None.
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
262 Class methods are accepted (and most useful!) as trace methods.
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
263
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
264 The events have the following meaning:
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
265
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
266 \begin{description}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
267
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
268 \item[\code{'call'}]
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
269 A function is called (or some other code block entered). The global
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
270 trace function is called; arg is the argument list to the function;
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
271 the return value specifies the local trace function.
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
272
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
273 \item[\code{'line'}]
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
274 The interpreter is about to execute a new line of code (sometimes
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
275 multiple line events on one line exist). The local trace function is
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
276 called; arg in None; the return value specifies the new local trace
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
277 function.
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
278
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
279 \item[\code{'return'}]
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
280 A function (or other code block) is about to return. The local trace
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
281 function is called; arg is the value that will be returned. The trace
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
282 function's return value is ignored.
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
283
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
284 \item[\code{'exception'}]
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
285 An exception has occurred. The local trace function is called; arg is
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
286 a triple (exception, value, traceback); the return value specifies the
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
287 new local trace function
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
288
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
289 \end{description}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
290
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
291 Note that as an exception is propagated down the chain of callers, an
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
292 \code{'exception'} event is generated at each level.
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
293
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
294 Stack frame objects have the following read-only attributes:
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
295
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
296 \begin{description}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
297 \item[f_code] the code object being executed
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
298 \item[f_lineno] the current line number (\code{-1} for \code{'call'} events)
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
299 \item[f_back] the stack frame of the caller, or None
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
300 \item[f_locals] dictionary containing local name bindings
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
301 \item[f_globals] dictionary containing global name bindings
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
302 \end{description}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
303
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
304 Code objects have the following read-only attributes:
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
305
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
306 \begin{description}
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
307 \item[co_code] the code string
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
308 \item[co_names] the list of names used by the code
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
309 \item[co_consts] the list of (literal) constants used by the code
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
310 \item[co_filename] the filename from which the code was compiled
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2491
diff changeset
311 \end{description}