[IPython-user] Using IPython magic commands in a script to be run in IPython
Mon Feb 15 09:14:29 CST 2010
I want to run a script which executes the IPython %run command to set
up an environment (like a lightweight import) before I work in
IPython. This will only ever be run itself from an IPython interpreter
How do I do this?
I have tried
ip = IPython.ipapi.get()
but somehow the IPython.ipapi is removed from scope after the first
execution of ip.magic ...
More information about the IPython-user