ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 09 Feb 2013 20:01:57 +0100How do I save my "workspace" in the notebook?https://ask.sagemath.org/question/9785/how-do-i-save-my-workspace-in-the-notebook/Hi - another one of my IT-naive questions ... I have some notebook worksheets which do massive preliminary calcs before then embarking on even more massive subsequent search calcs (among the results of the first code module). Is there a way of saving the results of the first calcs so that I may call them in and run the second module on them, without having to generate them all over again every time?
Thanks a lot for any help out there ....Fri, 08 Feb 2013 12:08:12 +0100https://ask.sagemath.org/question/9785/how-do-i-save-my-workspace-in-the-notebook/Answer by ppurka for <p>Hi - another one of my IT-naive questions ... I have some notebook worksheets which do massive preliminary calcs before then embarking on even more massive subsequent search calcs (among the results of the first code module). Is there a way of saving the results of the first calcs so that I may call them in and run the second module on them, without having to generate them all over again every time? </p>
<p>Thanks a lot for any help out there ....</p>
https://ask.sagemath.org/question/9785/how-do-i-save-my-workspace-in-the-notebook/?answer=14528#post-id-14528Look at `save`, `save_session`, `load`, `load_session` and the `DATA` variable. There is a short explanation at the bottom of the first help page that you can access from the Help link in the notebook interface.Fri, 08 Feb 2013 15:43:57 +0100https://ask.sagemath.org/question/9785/how-do-i-save-my-workspace-in-the-notebook/?answer=14528#post-id-14528Comment by ppurka for <p>Look at <code>save</code>, <code>save_session</code>, <code>load</code>, <code>load_session</code> and the <code>DATA</code> variable. There is a short explanation at the bottom of the first help page that you can access from the Help link in the notebook interface.</p>
https://ask.sagemath.org/question/9785/how-do-i-save-my-workspace-in-the-notebook/?comment=18259#post-id-18259Try this. In worksheet A, save your obj.sobj in the DATA directory like this
save(variable, DATA+'obj.sobj')
Then go to the "Data" drop down menu and select this file and create a link to this file from any worksheet you want. There are instructions which say how to load this file in the other worksheet.Sat, 09 Feb 2013 20:01:57 +0100https://ask.sagemath.org/question/9785/how-do-i-save-my-workspace-in-the-notebook/?comment=18259#post-id-18259Comment by GaryMak for <p>Look at <code>save</code>, <code>save_session</code>, <code>load</code>, <code>load_session</code> and the <code>DATA</code> variable. There is a short explanation at the bottom of the first help page that you can access from the Help link in the notebook interface.</p>
https://ask.sagemath.org/question/9785/how-do-i-save-my-workspace-in-the-notebook/?comment=18261#post-id-18261thanks - but maybe i didn't explain myself well enough - I am looking for something I can carry across SAGE sessions - so for example I can call it up in a new session of the SAGE server, and I can call it across from one file to another (ie I save "obj" generated from worksheet A as obj.sobj and then while running worksheet B I load it. I cannot get it even to recognize it from one session to another of worksheet A, let alone from A to B. And when I look for the files in the directories, they are not there ... sorry but I really don't understand how the worksheets are saved as directories rather than files etc etc. Is there an easy example of how to do this somewhere please? Thanks againSat, 09 Feb 2013 15:20:52 +0100https://ask.sagemath.org/question/9785/how-do-i-save-my-workspace-in-the-notebook/?comment=18261#post-id-18261