[IPython-dev] Can I open ipython from another python script with some objects shared (like code.InteractiveConsole) ?

Julian Taylor jtaylor.debian at googlemail.com
Wed Sep 21 15:00:07 EDT 2011

On 09/21/2011 09:07 AM, rohit hiwale wrote:
> I have a qt application.
> I want to share my MainWindow object with ipython for debugging purpose.
> Currently I am using code.InteractiveConsole which allows me to
> initialize the locals for the python console.
> /eg.    myconsole =
> code.InteractiveConsole(locals={'shared_object':MainWindow_object})/
> /        myconsole.interact()/
> Does ipython supports such interactive console ?
> If yes, how can I do same thing with ipython ?
> It will be even better if it can be done with ipython-qtconsole !!
> PS : ipython-qtconsole is awesome !!

yes you can embed an terminal ipython console into your application.
See an example in docs/examples/core/example-embed.py
and this page for both 0.10 and 0.11 variants + a bunch of patches for
applications already doing it:

Best Regards,
Julian Taylor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20110921/d22deea5/attachment.sig>

More information about the IPython-dev mailing list