deepak
deepak

Reputation: 2075

Open a Jupyter notebook within running server from command line

My Jupyter/IPython notebooks reside in various directories all over my file system. I don't enjoy navigating hierarchies of directories in the Jupyter notebook browser every time I have to open a notebook. In absence of the (still) missing feature allowing to bookmark directories within Jupyter, I want to explore if I can open a notebook from the command line such that it is opened by the Jupyter instance that is already running. I don't know how to do this....

Upvotes: 3

Views: 1504

Answers (1)

conner.xyz
conner.xyz

Reputation: 7275

Option 1: Run multiple jupyter notebook servers from your project directory root(s). This avoids navigating deeply nested structures using the browser ui. I often run many notebook servers simultaneously without issue.

$ cd path/to/project/; jupyter notebook;

Option 2: If you know the path you could use webbrowser module

$ python -m webbrowser http://localhost:port/path/to/notebook/notebook-name.ipynb

Of course you could alias frequently accessed notebooks to something nice as well.

Upvotes: 3

Related Questions