stop exeuction and give my a prompt

Michael Hudson mwh at
Wed Apr 2 17:54:01 CEST 2003

David Bear <david.bear at> writes:

> I would like to have the ability to insert a statement in my code that would 
> stop program execution at that point and give me a python prompt.  I don't 
> know what to call this. 
> What I would like to do is to stop program execution and inspect the state 
> of certain dictionaries --- I don't want to insert a bunch of print 
> statements and watch output fly of the screen.  I'd also like to be able to 
> fiddle with these dictionaries when my program stops.  
> Any pointers?

Look at the documentation for the standard library module 'code'.


  You have run into the classic Dmachine problem: your machine has
  become occupied by a malevolent spirit.  Replacing hardware or
  software will not fix this - you need an exorcist. 
                                       -- Tim Bradshaw, comp.lang.lisp

More information about the Python-list mailing list