saving . . . saved Regarding %Save command has been deleted. Regarding %Save command has been hidden .
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 29-04-20, 5:49 p.m. anjalideore13@gmail.com

Answers:

Try %save d:\\python FDP\\History.py 2-5 7 command.
29-04-20, 6:19 p.m. aditya94palaparthy@gmail.com


Try %save d:\\python FDP\\History.py 2-5 7 command an then run %run -i d:\\python FDP\\History.py
29-04-20, 6:19 p.m. aditya94palaparthy@gmail.com


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                                                                               
29-04-20, 11:37 p.m. anjalideore13@gmail.com
Please add the show() command at the end of the file.
25-10-21, 6:48 p.m. aditya94palaparthy@gmail.com

Login to add comment


Log-in to answer to this question.