Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users should be able to open different notebooks in the cwd #605

Closed
ellisonbg opened this issue Jul 20, 2011 · 5 comments
Closed

Users should be able to open different notebooks in the cwd #605

ellisonbg opened this issue Jul 20, 2011 · 5 comments
Assignees
Labels
Milestone

Comments

@ellisonbg
Copy link
Member

  • The ShellRouter will append {'cwd': 'import os; os.getcwd()'} to the user_expressions of each execute request.
  • The ShellRouter will pop the returned valued of cwd and use that for all file requests. This will allow the server to track the cwd of the kernel.
  • The Open/New/Save actions of the notebook will use that cwd for all actions. For now a simple dialog for notebook selection will suffice.
  • There will also be a URL for the notebooks, such as /notebooks/notebookname.ipynb.
@ghost ghost assigned ellisonbg Jul 20, 2011
@minrk
Copy link
Member

minrk commented Jul 20, 2011

I think you will have to be very careful with this, to prevent actually editing the user's history. I think adding a cwd request to the control-socket might be preferable, so you aren't overloading non-execution requests on an execution message, and making extra system calls with every user execution.

@ellisonbg
Copy link
Member Author

I thought that the user_expressions capability already handled this so that the history is not affected. I will test this to make sure the history is not affected though. I want to avoid additional calls because i) the only time the cwd can change is in an execute_request and ii) I don't want the extra network requests.

@minrk
Copy link
Member

minrk commented Jul 20, 2011

Right, but you are making extra calls - calling getcwd at every execution seems like a bad idea, since you are generating the same information, when <1% of the time it's actually useful. I don't see why you would mash non-execution into an execution request when we have a control-queue model for doing non-execution related requests.

@ellisonbg
Copy link
Member Author

I just realized this whole approach won't work. Having the notebook server follow the cwd of a kernel won't work because different kernels can have different cwd's. There will need to be a separate step that allows the user to select the cwd for the notebook server, which will be like the active "project" for the notebook server.

But, the entire reason we put in the user_expressions capability was to handle cases like this. Originally, I argued that this was a bad idea for exactly the reasons you are describing. But, Fernando and Evan wanted it, so it is there. I am going to close this and open a new issue with the new design reflected.

@ellisonbg
Copy link
Member Author

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants