On Apr 21, 2010, at 4:52 PM, Michael Rybalkin wrote:
I have installed local Sage server.
I need some kind of workspace with multiple worksheets and common data
storage while working via web interface. What can you recommend in
this case?
There aren't currently any good solutions to this unless you have
access to the filesystem the computer is running on (e.g. you're
running your own server) in which case you could use absolute paths.
There was a lot of talk about improving this at the Sage Education Day
last December, but I don't think anyone's actually had the time to
implement it (or even work it out fully).
I want to have a bunch of common files for different worksheets. But I
don't want to link them explicity to other worksheets (by creating a
linked copy via web interface), because this data files are generated
dynamically. For example in one worksheet I wants to generate 1000
files with data and in another worksheet I want to load some of them.
I have found 2 solutions:
1. Little hack. Create some common directory in user's home directory
with worksheets and load data as
load(DATA + "../../common_dir/some_file")
But in this case I cannot use web interface to work with files in such
common directory.
2. Other hack. I can load data (or script) from another worksheet by
doing another hack:
load(DATA + "../../<number>/data/some_file")
In this case I can work with data via web interface via worksheet with
<number> number. But how can I get worksheet number (or path to it)
but its name? I need to call sagenb.notebook.worksheet.directory() for
some worksheet. Is it possible to get "current notebook" object or
something like this.
No, you can't get at that, because (for security reasons) the notebook
server itself is running in a completely different process (and often
as a different user) than the sage session you're working in.
If no good solution will be found then I will use 1st variant with
common directory in sage user's home directory.
That would probably be the best approach for now, though it may be a
bit brittle as there are no guarantees about the future layout above
DATA.
- Robert
--
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