Re: Start the interactive shell within an application

2009-06-09 Thread alex23
On Jun 10, 1:40 am, Ben Charrow wrote: > If you're looking to debug your program, try "import pdb" Another option, if you wish to debug an error, is to run python using the -i parameter. This will leave you inside the interpreter at the point that execution stops. Very handy. - alex23 -- http:/

Re: Start the interactive shell within an application

2009-06-09 Thread Robert Kern
On 2009-06-09 03:49, Jean-Michel Pichavant wrote: I was wondering if there is a way to start an interactive shell within a script/application. I'm sometimes tired of adding prints to scan the current namespace so I'd like to pause the execution and give the user the shell prompt. This is obviousl

Re: Start the interactive shell within an application

2009-06-09 Thread Ben Charrow
If you're looking to debug your program, try "import pdb" and then wherever you want to debug put: pdb.set_trace() Your program will then enter the debugger when it executes that line. It's quite nice really. If you get confused on what to do, just type "help" http://docs.python.org/library/pd

Re: Start the interactive shell within an application

2009-06-09 Thread Javier Collado
Take a look either at code.interact or at IPython.ipapi.launch_new_instance. Basically, the only thing that you have to provide is a dictionary object that contains the namespace that you would like to have in your shell once it's launched. Best regards, Javier 2009/6/9 eGlyph : > On Jun 9, 1

Re: Start the interactive shell within an application

2009-06-09 Thread eGlyph
On Jun 9, 11:49 am, Jean-Michel Pichavant wrote: > I'm sometimes tired of adding prints to scan the current namespace so > I'd like to pause the execution and give the user the shell prompt. > This is obviously for debugging purpose. This is definitely doable, have look at rhythmbox or gedit - th

Start the interactive shell within an application

2009-06-09 Thread Jean-Michel Pichavant
I was wondering if there is a way to start an interactive shell within a script/application. I'm sometimes tired of adding prints to scan the current namespace so I'd like to pause the execution and give the user the shell prompt. This is obviously for debugging purpose. I know that I may use t