att / rcloud

Collaborative data analysis and visualization
http://rcloud.social
MIT License
429 stars 141 forks source link

passing working directory between languages #2757

Open s-u opened 2 years ago

s-u commented 2 years ago

It would be nice if cells of different languages would be able to pass some basic state such as the working directory. Currently using shell cells the working directory doesn't get passed even between subsequent shell cells, in R and kernel-based languages it does. However, in none of the case does it pass between cells of different languages. Ideally, we would have some state that is synchronized between cells, working directory being the prime example but some environment variables would be another.

This is not easy to implement in general, since the management of the state will be language-specific (e.g., chdir in the shell, setwd() in R, os.chdir() in Python...). But having some hooks to get/set the state would be the first step.