Open remram44 opened 9 years ago
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.
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)
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.
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).
Doesn't fix #15, but at least opens the right notebook if you pass a directory to nbopen.