Next / Previous / Contents / TCC Help System / NM Tech homepage

19.2. Functions exported by pdb

The pdb module exports these functions:[,globals[,locals]])

Executes any Python statement. You must provide the statement as a string. The debugger prompts you before beginning execution. You can provide your own global name space by providing a globals argument; this should be a dictionary mapping global names to values. Similarly, you can provide a local namespace by passing a dictionary locals.


This is similar to the pdb run command, but it evaluates an expression, rather than a statement. The expr is any Python expression in string form.


Calls a function under pdb control. The func must be either a function or a method. Arguments after the first argument are passed to your function.