Paul Boddie napisaĆ(a):
There are certain ways to override the autodetection in use within that
module, and a DESKTOP_LAUNCH environment variable can also be set to
configure its behaviour further. Unfortunately, attempts to confirm the
standardisation status of that variable failed to cut
ncf This section is the cause of the problem:
ncf for browser in (mozilla-firefox, mozilla-firebird,
ncf mozilla, netscape):
ncf if _iscommand(browser):
ncf register(browser, None, Netscape(browser))
In SVN trunk
This seems ok...
import webbrowser
webbrowser._iscommand(firefox)
True
webbrowser.register(firefox,None,webbrowser.Netscape(firefox))
webbrowser._browsers
{'galeon': [None, webbrowser.Galeon instance at 0xb7d471cc],
'firefox': [None, webbrowser.Netscape instance at 0xb7d43bcc],
'mozilla':
Hi,
During optimizing SPE for Ubuntu, I found something strange. I have
Ubuntu 5.10 The Breezy Badger and unfortunately this code is not
working:
import webbrowser
webbrowser.open(http://www.python.org;)
It does not throw an exception, but is not able to launch a browser.
Ubuntu ships with
SPE - Stani's Python Editor wrote:
During optimizing SPE for Ubuntu, I found something strange. I have
Ubuntu 5.10 The Breezy Badger and unfortunately this code is not
working:
import webbrowser
webbrowser.open(http://www.python.org;)
It does not throw an exception, but is not able to
This section is the cause of the problem:
for browser in (mozilla-firefox, mozilla-firebird,
mozilla, netscape):
if _iscommand(browser):
register(browser, None, Netscape(browser))
It's trying to load mozilla-firefox as the exec name