Launch IPython notebook with selected browser

前端 未结 9 1608
暖寄归人
暖寄归人 2020-12-02 05:57

I am trying to start IPython with a non default browser (in my case Firefox) and thought I could replicate the replicate the script given in this blog

I am o

9条回答
  •  悲&欢浪女
    2020-12-02 06:22

    I tried what JPG and norfeldt suggested. It worked perfectly on my Windows 7 computer. Here is a copy of the modified section of ipython_notebook_config.py (located under C:\Users\'your username'\.ipython to use Safari as the default browser for notebook. As norfeldt said, please notice the u before 'C:\...)

    # c.NotebookApp.certfile = u''
    
    import webbrowser
    webbrowser.register('safari', None, webbrowser.GenericBrowser(u'C:\\Program Files (x86)\\Safari\\safari.exe'))
    c.NotebookApp.browser = 'safari'
    

提交回复
热议问题