[IPython-User] Running Embedded IP

Darren Govoni darren@ontrenet....
Mon Aug 15 15:33:30 CDT 2011

Thank you.

On 08/15/2011 02:11 PM, Thomas Kluyver wrote:
> On 15 August 2011 18:59, Darren Govoni <darren@ontrenet.com 
> <mailto:darren@ontrenet.com>> wrote:
>     ip = InteractiveShellEmbed()
>     I viewed the online docs for it, but it didn't show how to do this
>     programmatically.
> To run pure Python code in the interactive namespaces, "ip.ex(code)" 
> should work. To run code as if it was entered at the prompt 
> (translating magic functions, saving as a history entry, increasing 
> prompt count), use "ip.run_cell(code)". In the latter case, code needs 
> to be a string, not a compiled code object.
> There may also be a way using config to run code as the shell starts 
> up, but I'm not sure if that works for embedding.
> Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20110815/8d91366d/attachment.html 

More information about the IPython-User mailing list