[IPython-dev] how to run a script in empty name space?
tocer.deng at gmail.com
Mon May 21 05:42:45 EDT 2007
Yes, but I can't take advantage of all property of IPython. In Ipython help
documents, I found it in magic run command usage:
-i: run the file in IPython's namespace instead of an empty one. This is useful
if you are experimenting with code written in a text editor which depends on
variables defined interactively.
how to understand that?
Ville M. Vainio wrote::
> On 5/20/07, tocer <tocer.deng at gmail.com> wrote:
>> I do "run somescript.py" in IPython interpreter, then I print IPython
>> interactive name space by doing "print dir()". I found the globle
>> variants of
>> the somescript.py is in it. But I wish it run in empty name space, not
>> name space. How can I do?
> How about running them in a whole new process, i.e. 'python somescript.py'.
More information about the IPython-dev