On Mon, Mar 15, 2010 at 10:09 AM, Robert Bradshaw
<[email protected]> wrote:
> On Mar 15, 2010, at 9:54 AM, Robert Bradshaw wrote:
>
>> On Mar 15, 2010, at 1:15 AM, vdelecroix wrote:
>>
>>> Hello,
>>>
>>>> thanks, I tried all that onwww.sagenb.org.
>>>> I could access files many of the files of 221 visible 'users' in /
>>>> home,
>>>> like some vincent, a certain notorious wstein, a victor, a carlos, a
>>>> Ulrike etc. by
>>>>
>>>> import os; dn = '/home/some_user'; os.listdir(dn);
>>>> os.chdir(dn); fin = open('some_file'); fin.read(); ...
>>>
>>> That is a relative privacy leak in Sage which will be resolved by
>>> using a database instead of files for worksheets and setting well
>>> permissions for it (planned for google summer of code I think). But
>>> Sage can not avoid all problems arising from having a python console
>>> on a remote computer !
>>>
>>>> but I could _not_ access a directory /home/risse which is me
>>>> onwww.sagenb.org
>>>> Imho this is a security leak and at the same time rather dodgy:
>>>> I still do not know where to find my *.sage, *.py or *.pyx files
>>>> onwww.sagenb.org
>>>> which I want to import into another worksheet. Any help very much
>>>
>>> If you do not have access to the computer sagenb.org (ssh or telnet or
>>> ftp or anything else) you may not use it for this kind of stuff. But
>>> as you have a python console access and some write permissions you can
>>> do
>>>
>>> {{{
>>>  sage: f = open("/home/a path to which I have right to write/my
>>> file.sage")
>>>  sage: f.write("def f(x):\n")
>>>  sage: f.write("    return x+1")
>>>  sage: f.close()
>>> }}}
>>>
>>> {{{
>>> sage: attach "home/a path to which I have right to write/my
>>> file.sage"
>>> }}}
>>>
>>> {{{
>>> sage: f(3)
>>> 4
>>> }}}
>>>
>>> It is neither useful nor a good practice. If you want to attach .sage
>>> or .py files, the only way is to install a server on your own
>>> computer.
>>
>> Currently, that is the best option (and fortunately installing Sage is
>> relatively painless for most users). There was a lot of talk about refining
>> the Sage notebook at Sage Days 18, including making it much easier to
>> reference and use worksheets from each other.
>
> Though not cross-worksheet, what you can do is attach a .sage or .py file as
> data, then load that. See
>
>    http://sagenb.org/home/pub/1776/
>
> Of course installing Sage locally also has its advantages, for example
> you're not sharing the server resources with 40000 other users.
>
> - Robert

Heh, there are "only" 26,982 accounts on sagenb.org :-)

Cross-worksheet import might be possible by figuring out some path,
then appending to sys.path and doing import...

William

-- 
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