[IPython-User] [IPython-user] using magic command inside the loop
Tue Dec 28 14:52:15 CST 2010
So, I want to use %run inside a for loop in my script.py to call for another
Something like this:
#beginning of script.py
ip = IPython.ipapi.get()
for i in range(0,5):
#end of the script.py
However, when I execute script.py in my IPython shell, I get: "NameError:
name 'ip' is not defined"
My question is this: how come ip is not defined inside the for scope is I
just defined it before entering the loop?
Thank you very much for answering.
View this message in context: http://old.nabble.com/using-magic-command-inside-the-loop-tp30547307p30547307.html
Sent from the IPython - User mailing list archive at Nabble.com.
More information about the IPython-User