A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/pythonmac-sig/2003-October/009005.html below:

[Pythonmac-SIG] Stopping execution of a Python script

[Pythonmac-SIG] Stopping execution of a Python script [Pythonmac-SIG] Stopping execution of a Python scriptNicholas 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4