ipython/ipython — Issue #1001: Ipython "source" command?
Author: antoine-levitt
Created: 2011-11-15 13:43:23+00:00
State: open

If I have a file named test.py with

print a

in it, and if I do this in ipython:

a = 1
%run "test.py"

it'll complain that it doesn't know a, because the environment is different. Any way Ipython could implement a bash-like "source" command that'll treat the script just as if it was entered in the interpreter? That kind of stuff is especially useful when using ipython as a matlab-like environment for scientific computing (do some computation, and then some plots of it or something)