ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 10 Mar 2013 08:22:30 -0500change home directoryhttps://ask.sagemath.org/question/9899/change-home-directory/Dear Community,
I just started using Sage. I was able to install it on my computer, and use it through the Notebook mode on my web browser. I like that Sage keeps a copy of my worksheets, so that I can open them every time I start a Sage session.
The situation is that I have two computers from which I work on Sage. So in order to get the latest copy of my worksheets, I found that I can Upload and Save the worksheets to a different folder, one that I can access from the two computers.
This has worked okay for me, but it presents two inconveniences. One is that I sometimes find two copies of the same worksheet on my Sage session, the version that I just opened from the folder, and the version that I saved from my last session in that computer. The second inconvenience, is that I have to navigate to the common folder each time that I start and finish my session.
I would think that this could get solved if I could change the home directory to be set in my common folder, instead of where the Sage installation is. However I haven't found a way to do this, and would appreciate the help from the community.
Thank you
Diego
VillamilSun, 10 Mar 2013 08:22:30 -0500https://ask.sagemath.org/question/9899/working directory for load/attachhttps://ask.sagemath.org/question/7822/working-directory-for-loadattach/Question
--------
Is there a command to change the current working directory inside *sage*, so that the *load* (or *attach*) command uses that directory as base?
Background
----------
I have the following file-directory-situtation:
- directory *project-base*
- file *blub.sage* (contains some useful functions)
- file *run.sage* (contains a **`load blub.sage`** command)
To start the project i call **`sage run.sage`** in the directory *project-base*. Everything works fine.
If I now want to run the project from any other directory with **`sage path/project-base/run.sage`**, I get the error message, that the file `tools.sage` is not found. The error message is kind of clear, because in *run.sage* the file is loaded without any directory specifications.
A similar problem occours, when you want to call *run.sage* from the browser-notebook-interface.
Is there any possibility to solve this problem (except using absolute paths everywhere (which is clearly not a satisfying solution) or changing the directory structure or using soft-links)?
Daniel KrennSat, 18 Dec 2010 03:33:10 -0600https://ask.sagemath.org/question/7822/