Re: jump into the interpreter in a script

2006-02-09 Thread Fredrik Lundh
Carl Friedrich Bolz wrote: > 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. or, as a reusable function: http://effbot.org/librarybook/code.htm (see the third exam

Re: jump into the interpreter in a script

2006-02-09 Thread Carl Friedrich Bolz
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.

Re: jump into the interpreter in a script

2006-02-08 Thread Rick Ratzel
pdb might help. Add this to your code: import pdb pdb.set_trace() -- http://mail.python.org/mailman/listinfo/python-list

jump into the interpreter in a script

2006-02-08 Thread Brian Blais
Hello, 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 i