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

Use notebook_dir or file_to_run automatically #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

remram44
Copy link

Doesn't fix #15, but at least opens the right notebook if you pass a directory to nbopen.

@takluyver
Copy link
Owner

I'm ambivalent about specifying directories for nbopen - I mainly see the Python code as infrastructure for integrating IPython with a desktop environment so you can double click on notebooks.

It should still specify notebook_dir when you run it with a notebook file, though, which I think this currently breaks.

@remram44
Copy link
Author

It should still specify notebook_dir when you run it with a notebook file, though, which I think this currently breaks.

I don't get what you mean, sorry. This seems very close to what notebookapp does (or did, don't know much about 3.x)

@takluyver
Copy link
Owner

At present, when I run it with a notebook file, it will call launch_new_instance() specifying both file_to_run and notebook_dir. With this branch, it will only specify file_to_run.

@remram44
Copy link
Author

I had totally missed that notebook_dir was in there at all. Shouldn't it be the dirname() of the notebook? Using the homedir is unnecessarily unsafe...

Another approach would be to add a --notebook_dir option (although what I use nbopen for is just open a directory, not a specific notebook).

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

Successfully merging this pull request may close these issues.

Open exact directory
2 participants