Start the interactive shell within an application

Javier Collado javier.collado at gmail.com
Tue Jun 9 11:29:45 CEST 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,
    Javier

2009/6/9 eGlyph <eglyph at gmail.com>:
> On Jun 9, 11:49 am, Jean-Michel Pichavant <jeanmic... at sequans.com>
> 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.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list