wrong documentation? embedding IPython example doesn't work (for me)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

wrong documentation? embedding IPython example doesn't work (for me)

Jiri Machala

Hello,

I'm looking to integrate interactive shell to extended unittests framework I work on and I wanted to use IPython for that. But when I tried the example from http://ipython.readthedocs.io/en/stable/interactive/reference.html#embedding-ipython - embed_class_long.py it doesn't seem to work properly - after exiting instance of InteractiveShellEmbed for the first time, next time it should open it just displays both banner and exit messages and no actual shell opens.

 

Calling IPython.embed() works ok, but I need to set custom banner and new commands (magics in IPython lingo?) which I think isn't possible that way

 

I’ll be grateful for any guesses why the manual example doesn't work or what should I change/test/etc

 

(I'm using python 2.7 , IPython version 5.0.0 on Linux; tried also python 3.4.3 with same result)

 

Jiri Machala

 


“This e-mail message may contain confidential, commercial or privileged information that constitutes proprietary information of Xura, Inc. or its subsidiaries. If you are not the intended recipient of this message, you are hereby notified that any review, use or distribution of this information is absolutely prohibited and we request that you delete all copies and contact us by e-mailing to: [hidden email]. Thank You.”


_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: wrong documentation? embedding IPython example doesn't work (for me)

Thomas Kluyver-2
On 3 January 2017 at 10:17, Jiri Machala <[hidden email]> wrote:
embed_class_long.py it doesn't seem to work properly - after exiting instance of InteractiveShellEmbed for the first time, next time it should open it just displays both banner and exit messages and no actual shell opens.

How are you exiting it? It works for me (I get dropped into the embedded shell multiple times).

_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev