Ask Your Question
1

sf_sage_files as default folder

asked 2011-11-21 10:22:25 +0200

Igor gravatar image

Hi, i started using sage in windows. I followed the readme and created a shared folder so i can move files back an forth between my windows installation and sage virtual box installation. Now what i would like to do ist to make this folder which is in the virtual box "/media/sf_sage_files" the default folder for sage. So that all workshees are being automaticly saved there and when i use a path for example to load an image that this path is used as the default base path. How do i do that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-11-23 02:23:26 +0200

Kelvin Li gravatar image

One option is to pass the directory argument to the notebook function on every startup:

sage: notebook(directory="/path/to/sagenb/data")

On the command-line, this would be:

$ sage --notebook "directory=/path/to/sagenb/data"

Note that Sage will add a ".sagenb" extension (if not present) to the given directory name and use that as the actual notebook data directory. So the above example would actually use (or create, if non-existent) the directory "/path/to/sagenb/data.sagenb".

Note that this is different from the ".sage" directory, which is located at "~/.sage" by default. To change this, set the "DOT_SAGE" environment variable. If you set this variable without passing the notebook directory argument above, the notebook files will appear in "${DOT_SAGE}/sage_notebook.sagenb".

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-11-21 10:22:25 +0200

Seen: 643 times

Last updated: Nov 23 '11