[IPython-User] embedding..

Julian Taylor jtaylor.debian@googlemail....
Sat Aug 6 16:53:58 CDT 2011


On 08/06/2011 11:46 PM, Matthew Brett wrote:
> Hi guys,
> 
> Should I expect this to work?
> 
> <embed_me.py>
> def func():
>     a = 3
>     from IPython.Shell import IPShellEmbed
>     ipshell = IPShellEmbed()
>     ipshell()
> </embed_me.py>
> 
> python embed_me.py ?
> 
> It just returns to the shell silently and looks at me like I'm an idiot.

you never call func() in that file.
if you do that it should work with ipython 0.10

but with 0.11 you need to do this:

import IPython
IPython.embed()

see here for more details porting to 0.11:
http://wiki.ipython.org/Cookbook/Updating code that uses IPython for 0.11

-------------- 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.scipy.org/pipermail/ipython-user/attachments/20110806/6f34b12d/attachment.bin 


More information about the IPython-User mailing list