[IPython-User] Running Embedded IP
Mon Aug 15 13:11:41 CDT 2011
On 15 August 2011 18:59, Darren Govoni <email@example.com> wrote:
> ip = InteractiveShellEmbed()
> I viewed the online docs for it, but it didn't show how to do this
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User