drop into the interpreter

Miki Tebeka miki.tebeka at zoran.com
Sun Aug 15 14:31:06 CEST 2004


Hello Hoang,

> is there a facility to inspect the run-time of a python script?
> Essentially, it would execute a script to a set specific point and then drop
> into the interpreter.  Something like a "Stop" or "Break"?
"pdb" module set_trace does what you want (and you're in the deubgger
environment...)
---
import pdb

print 1
pdb.set_trace()
print 2
---

HTH.
--
------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
http://tebeka.spymac.net
The only difference between children and adults is the price of the toys



More information about the Python-list mailing list