Brian Blais wrote:
> I was wondering if there is a way to, within a script, jump into the 
> interpreter.
> What I mean is something like the "keyboard" command in Matlab, where the 
> script
> pauses and you get an interpreter prompt, where you can look at variables, 
> change
> their values, etc.  then when you exit the interpreter, the script continues 
> from
> where it left off.  Is this possible in python?

Yes. The "code" module of the stdlib is what you want. put

import code
code.interact(local=locals())

into a point where you would like to have an interpreter prompt.

Cheers,

Carl Friedricch

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to