webbrowser.py
Oleg Broytmann
phd at phd.pp.ru
Tue Sep 4 04:44:55 EDT 2001
Hello!
I have minor problem with the webbrowser.py module and BROWSER
environment variable. Under XWindows I set this variable to
BROWSER="/usr/local/mozilla/mozilla -remote \"openURL(%s,new-window)\":\
/usr/local/mozilla/mozilla %s"
The problem is that when webbrowser.py sees %s in that variable, it does
not instantiate correct class - instead it creates GenericBrowser.
But this is wrong! Class Netscape from webbrowser starts a browser if it
is not already running, but GenericBrowser does not start it!
To overcome the problem I have to del os.environ["BROWSER"]! This is
certainly not the way ESR intended things to be.
I think webbrowser.py must run through browsers defined in BROWSER
environment variable and stop at the first that returns 0 as error code.
Oleg.
----
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list