Sorry about the beginner's question.  The FAQ clarified matters.  The
tutorial on save() and load() must be obsolete.

The FAQ says to save(object, DATA+filename), then load(DATA
+filename).  This works.

It seems one must make a note of the value of DATA when saving, in
order to load the object in another worksheet.

Daniel Friedan

On Jul 14, 3:58 pm, 8fjm39j <[email protected]> wrote:
> A beginner's question: how to save and load objects?
>
> I tried to follow the examples in the tutorial, but without success.
> Am I missing something obvious?
>
> (using both Sage 4.4.4 OS X 10.6 and Sage 4.3.4 Linux).
>
> sage:  save(solution, '2-2-solution')
>
>      2-2-solution.sobj
>
> sage: load('2-2-solution')
>
>      IOError: [Errno 2] No such file or directory: '2-2-solution.sobj'
>
> The file 2-2-solution.sobj does exist,  in one of the subdirectories
> of 11/cells/  where 11/ is the worksheet directory.
>
> In a similar vein:
>
> sage: DATA
>
> '/Users/daniel/.sage/sage_notebook.sagenb/home/pi5_of_SU2/11/data/'
>
> Why does DATA refer to a specific worksheet?  The documentation says
> that DATA is used to store files that are to be shared between
> worksheets.
>
> thanks again for any help,
> Daniel Friedan

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to