double click to open an ipython notebook

后端 未结 2 1768
难免孤独
难免孤独 2020-12-02 19:05

Related posts: Open an ipython notebook via double-click on osx

How can I open Ipython notebook from double click? I always cd to the directory of the notebook, then

相关标签:
2条回答
  • 2020-12-02 19:25
    1. pip install nbopen.
    2. open Automator, create new Application

      • Drag'n drop Run Shell Script
      • Change Pass input to as arguments
      • Copy/paste this script:
      variable="'$1'"
      the_script='tell application "terminal" to do script "nbopen '
      osascript -e "${the_script}${variable}\""
      
    3. Save the new application to Applications directory as nb_open

    4. 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".
    5. Select an ipynb file, get info (command + i) > Open With (select nb_open if not selected already) > Click Change All.... Done.
    0 讨论(0)
  • 2020-12-02 19:32

    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.

    0 讨论(0)
提交回复
热议问题