Firefox bug in webbrowser module on Ubuntu?!

SPE - Stani's Python Editor spe.stani.be at gmail.com
Sat Jan 21 22:15:49 EST 2006


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': [None, <webbrowser.Netscape instance at 0xb7d4708c>],
'mozilla-firefox': [None, <webbrowser.Netscape instance at
0xb7d4712c>], 'w3m': [None, <webbrowser.GenericBrowser instance at
0xb7d43fec>]}

But it is still not working...
>>> webbrowser.open("http://www.python.org")
...doesn't do anything

However...
>>> import os
>>> os.path.exists('/usr/bin/firefox')
True

I also have Ubuntu on a VMware Player and there it works out of the
box, although firefox is not registered there. (mozilla-firefox is.)

It is strange as I just installed Ubuntu on this system and can't
imagine something is screwed up already.




More information about the Python-list mailing list