[Pythonmac-SIG] Stopping execution of a Python script

Nicholas Riley njriley at uiuc.edu
Fri Oct 10 14:58:44 EDT 2003

On Fri, Oct 10, 2003 at 11:57:23AM -0600, Robb Brown wrote:
> Is there a way to create a simple breakpoint in a Python script?  Like 
> a stop command that stops the interpreter but doesn't kick you back to 
> the command line like sys.exit()?

import pdb; pdb.set_trace() is the standard idiom; it'll drop you into
the debugger.

=Nicholas Riley <njriley at uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>

More information about the Pythonmac-SIG mailing list