![](/img/trans.png)
[英]How to default open Jupyter Notebook in incognito mode (Chrome)
[英]How to open jupyter on google chrome incognito mode
我用的是win10,默認瀏覽器是chrome。
當我運行以下命令時python -m notebook
google chrome 彈出。 在jupyter_notebook_config.py
我還沒有修改任何東西,我只是嘗試了以下但不幸的是它不起作用:
## Specify what command to use to invoke a web browser when opening the notebook.
# If not specified, the default browser will be determined by the `webbrowser`
# standard library module, which allows setting of the BROWSER environment
# variable to override it.
# Default: ''
c.NotebookApp.browser = 'C:/Program Files/Google/Chrome/Application/chrome.exe -incognito %s'
您只需要將其復制到.py
文件中。
import webbrowser
webbrowser.register('private_chrome', None, webbrowser.get('"' + 'C:/Program Files/Google/Chrome/Application/chrome.exe' +'" -incognito %s'))
c.NotebookApp.browser = 'private_chrome'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.