Start the interactive shell within an application

Javier Collado javier.collado at
Tue Jun 9 05:29:45 EDT 2009

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,

2009/6/9 eGlyph <eglyph at>:
> On Jun 9, 11:49 am, Jean-Michel Pichavant <jeanmic... at>
> 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 - they
> provide an interactive console.
> Also, have a look at IPython, they have a recipe and an example of
> embedding IPython into a user's application.
> --

More information about the Python-list mailing list