S
SPE - Stani's Python Editor
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:
It does not throw an exception, but is not able to launch a browser.
Ubuntu ships with Firefox as its default browser, but it looks like it
is not recognized by the standard webbrowser module, instead it seems
to prefer Netscape, which is not installed:
'netscape'
In the _browsers attribute there seems to be an entry for
'mozilla-firefox', but doesn't seem to work{'galeon': [None, <webbrowser.Galeon instance at 0xb7d261cc>],
'mozilla': [None, <webbrowser.Netscape instance at 0xb7d2608c>],
'mozilla-firefox': [None, <webbrowser.Netscape instance at
0xb7d2612c>], 'w3m': [None, <webbrowser.GenericBrowser instance at
0xb7d22fec>]}
The tryorder is...['galeon', 'mozilla-firefox', 'mozilla', 'w3m']
As a workaround I check for the file '/usr/bin/firefox' and use a
os.system call. Of course a user could maybe install Netscape, but it
would be absurd that SPE would require Netscape.
Is there a reason why this doesn't work? It looks like a bug.
Stani
During optimizing SPE for Ubuntu, I found something strange. I have
Ubuntu 5.10 "The Breezy Badger" and unfortunately this code is not
working:
It does not throw an exception, but is not able to launch a browser.
Ubuntu ships with Firefox as its default browser, but it looks like it
is not recognized by the standard webbrowser module, instead it seems
to prefer Netscape, which is not installed:
'netscape'
In the _browsers attribute there seems to be an entry for
'mozilla-firefox', but doesn't seem to work{'galeon': [None, <webbrowser.Galeon instance at 0xb7d261cc>],
'mozilla': [None, <webbrowser.Netscape instance at 0xb7d2608c>],
'mozilla-firefox': [None, <webbrowser.Netscape instance at
0xb7d2612c>], 'w3m': [None, <webbrowser.GenericBrowser instance at
0xb7d22fec>]}
The tryorder is...['galeon', 'mozilla-firefox', 'mozilla', 'w3m']
As a workaround I check for the file '/usr/bin/firefox' and use a
os.system call. Of course a user could maybe install Netscape, but it
would be absurd that SPE would require Netscape.
Is there a reason why this doesn't work? It looks like a bug.
Stani