Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This isn't possible with DATA, as you mention, unfortunately.

But there is the following workaround if you have permissions on your computer (for instance). I don't know whether this would work on a server, though presumably it might if you chmod the file in question appropriately?

Suppose you have a file you want to use at /Users/myusername/Downloads/List3000.sobj. Then

L = load('/Users/myusername/Downloads/List3000')

works in the notebook. I don't see any reason that as many worksheets as possible couldn't do that. You would need the full path, though.

The reason this works is because DATA just gives a full path as a string too:

sage: DATA
'/Users/myusername/.sage/sage_notebook.sagenb/home/admin/171/data/'

This isn't possible with DATA, as you mention, unfortunately.

But there is the following workaround if you have permissions on your computer (for instance). I don't know whether this would work on a server, though presumably it might if you chmod the file in question appropriately?

Suppose you have a file you want to use at /Users/myusername/Downloads/List3000.sobj. Then

L = load('/Users/myusername/Downloads/List3000')

works in the notebook. I don't see any reason that as many worksheets as possible couldn't do that. You would need the full path, though.

The reason this works is because DATA just gives a full path as a string too:

sage: DATA
'/Users/myusername/.sage/sage_notebook.sagenb/home/admin/171/data/'

Edit:

However, you can make a file accessible to other worksheets that you own by going to the Data dropdown menu, choosing the file, and then doing "create a linked copy to the worksheet" and choosing a worksheet. I don't know if this would help with your case or not.