繁体   English   中英

如何在隐身模式下默认打开 Jupyter Notebook (Chrome)

[英]How to default open Jupyter Notebook in incognito mode (Chrome)

无论我做什么,jupyter notebook 总是以 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: ''

import webbrowser
webbrowser.register('incognito-chrome',None, webbrowser.get("C:/Program Files/Google/Chrome/Application/chrome.exe %s --incognito"))
c.ServerApp.browser = 'incognito-chrome'

请帮忙

打开隐身镀铬窗口的另一种方法如下:

import webbrowser as wb
jUrl = 'http://localhost:8888' #Default jupyter host
incongnito_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s --incognito'
wb.get(incongnito_path).open_new(jUrl)

这对我有用!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM