Regarding %Save command
Title
Question
If i want to save history to different location then what is to be type?
i wrote --
%save History.py 2-5 7
%save d:\python FDP\History.py 2-5 7
pwd
'C:\\Users\\Lenovo'
%save D:\\python FDP\\History.py 2-5 7
%save D:\python FDP\History.py 2-5 7
%run -i History.py
%run -i History.py
executing without error but file not getting created.
Python-3.4.3 Additional-features-of-IPython 06-07 min 10-20 sec
Answers:
Try %save d:\\python FDP\\History.py 2-5 7 command.
Try %save d:\\python FDP\\History.py 2-5 7 command an then run %run -i d:\\python FDP\\History.py
In [24]: %save d:\\python FDP\\History.py 2-5 7
File `d:\\python.py` exists. Overwrite (y/[N])? y
The following commands were written to file `d:\\python.py`:
x=linspace(-2*pi,2*pi,100)
plot(x,x*sin(x))
xlabel('x')
ylabel(r'$f(x)$')
title(r'$x*sin(x)$')
In [25]: %run -i d:\\python FDP\\History.py
In [26]:
tried , no error but not plot is displaying as well as no python file is available at d:\\python FDP\\History.py
Login to add comment