double click to open an ipython notebook
To "promote" Yogesh's helpful comment to a fully self-contained answer:
Windows 10
In a CMD or PowerShell window with administrative rights (e.g. Win+X, A):
pip install nbopen
python -m nbopen.install_win
- Profit!
Double-click on *.ipynb
files now starts a new server or reuses an existing instance.
- pip install nbopen.
open Automator, create new Application
- Drag'n drop
Run Shell Script
- Change
Pass input
toas arguments
- Copy/paste this script:
variable="'$1'" the_script='tell application "terminal" to do script "nbopen ' osascript -e "${the_script}${variable}\""
- Drag'n drop
Save the new application to
Applications
directory asnb_open
- Right click any ipynb file and select "Open with > Other" and select the
nb_open
in the Applications folder. Don't forget to check "Always Open With". - Select an ipynb file, get info (
command + i
) > Open With (select nb_open if not selected already) > ClickChange All...
. Done.
You can use a project like nbopen that handle that and will open the browser on the right notebook + start an IPython server if one is not yet running.