Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Do you want to use the definitions in different worksheets?

Unfortunately there is no way to store a data file in the users home directory (or I don't know about) unless you have direct access to the server. (I tried data file names like '../../test.sage', but it didn't work, the file appears in the data sub-folder of the current worksheet.

Suppose you have stored a data file 'test.sage' in a worksheet with ID 100, you can access this file in another worksheet with

load(DATA+'../../100/data/test.sage')

If you run your own server you can store a file (for example 'impressum.sage') in your sage notebook home directory. Access from any of your worksheets can be done like this:

MYHOME = os.path.normpath(DATA+'/../..')+os.sep
load(MYHOME+'impressum.sage')

May be it can be done more straightforward?