python - ipython use "%run" to execute a subset of a file -
is there way can use %run execute subset of file?
something this:
$ ipython in [1]: %run my_code.py -l 20 100 # executes lines 20-100 in ipython interpereter
%run
doesn't have option this. can see options takes doing %run?
inside ipython.
however, can bring specific range of lines file interactive prompt, , run there. syntax looks like:
%load -r 20-100 my_code.py
Comments
Post a Comment