Just to spell out the obvious: By the principle of least surprise the 
working directory should always be the same if possible.



On Wednesday, October 28, 2015 at 1:28:15 AM UTC+1, Andrey Novoseltsev 
wrote:
>
> I have ran
>
> import subprocess
> print subprocess.check_output("pwd")
> print r.eval("system('pwd')")
> print subprocess.check_output("pwd")
>
> in SageNB, SageMathCell, and SageMathCloud. The result always is: the 
> middle one gives a different directory for R than the other two for Sage 
> (OK, in the cloud I had to put the worksheet in a subfolder to make them 
> different). Why is that the case? What if I want to use files between 
> different systems? (Like I want to save "plot.png" in R.) Looking at the 
> code for R interface, it does not seem to be specific to R, although I 
> didn't try other interfaces. Shouldn't the working directory be the same 
> for all interfaces including "the main one", at least when I didn't try to 
> change it explicitly?
>
> SageNB uses different tmp directory for each cell execution. There is 
> probably no point in adjusting to it in Sage. But the cell server uses a 
> specific tmp directory for the whole session (in case of interacts/linked 
> cells) and the cloud sensibly uses the directory of the worksheet as the 
> starting one. Interfaces should be started there as well and I think it 
> should be taken care of by Sage, not interfaces.
>
> Thank you,
> Andrey
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to