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

nbopen doesn't create file it it doesn't exist #65

Open
ctb opened this issue Sep 29, 2019 · 4 comments
Open

nbopen doesn't create file it it doesn't exist #65

ctb opened this issue Sep 29, 2019 · 4 comments

Comments

@ctb
Copy link

ctb commented Sep 29, 2019

e.g.
nbopen foo.ipynb opens the JupyterLab interface if foo.ipynb doesn't exist, instead of creating it.

Ideally, it would create an empty file of that name and then open it with jupyter. I bet the tricky bit is that you have to guess at the format of the file based on the name...

@ctb
Copy link
Author

ctb commented Sep 29, 2019

Whups! Realized -n/--new does this just fine! I feel like this could/should be the default tho?

@takluyver
Copy link
Owner

Yup, it should either create the file, or fail consistently with a short, clear error message. At present, it fails with a load of Jupyter messages ending in a reasonable error if there isn't a server running, and opens a 404 page if there is.

I'll have a think about which I prefer.

@ctb
Copy link
Author

ctb commented Sep 30, 2019 via email

@takluyver
Copy link
Owner

It should be pretty straightforward :-). If you can get a PR in before I've decided what I prefer, I'll go with what you want.

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

No branches or pull requests

2 participants