be more explicit about how --browser value is used

This commit is contained in:
Paul Ivanov 2012-02-14 14:26:31 -08:00
parent 407c8ee6d7
commit 6ee29b4c72

View File

@ -291,11 +291,11 @@ class NotebookApp(BaseIPythonApplication):
""") """)
browser = Unicode(u'', config=True, browser = Unicode(u'', config=True,
help="""Specify which browser to use when opening the help="""Specify what command to use to invoke a web
notebook. If not specified, the default browser will be browser when opening the notebook. If not specified, the
determined by the `webbrowser` standard library module, default browser will be determined by the `webbrowser`
which allows setting of the BROWSER environment variable standard library module, which allows setting of the
to override it. BROWSER environment variable to override it.
""") """)
read_only = Bool(False, config=True, read_only = Bool(False, config=True,
@ -441,7 +441,7 @@ class NotebookApp(BaseIPythonApplication):
if self.open_browser: if self.open_browser:
ip = self.ip or '127.0.0.1' ip = self.ip or '127.0.0.1'
if len(self.browser) == 0: if self.browser:
browser = webbrowser.get() browser = webbrowser.get()
else: else:
browser = webbrowser.get(self.browser) browser = webbrowser.get(self.browser)