Difference between the commands
Title
Question
I have confusion between %run file and %run -i file. In both the cases, i am getting the output but i want to know which one to be used in which instance. what does -i indicates in the later command.
Python-3.4.3 Parsing-data 10-11 min 30-40 sec
Answers:
%run is used to run the named file inside IPython as a program.
the -i option will 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.
Login to add comment