diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2002-11-25 17:25:04 (GMT) |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2002-11-25 17:25:04 (GMT) |
commit | 1456fde6a0d21cef0d78250c7d0f996772530502 (patch) | |
tree | 6fcfb65b2f0ded9cf3e08750fd36ebe3bd459c13 /Lib/webbrowser.py | |
parent | 3d654d6dff9de4ec1034dff667ff665fa5456215 (diff) | |
download | cpython-1456fde6a0d21cef0d78250c7d0f996772530502.zip cpython-1456fde6a0d21cef0d78250c7d0f996772530502.tar.gz cpython-1456fde6a0d21cef0d78250c7d0f996772530502.tar.bz2 |
Fixed bug
[#495695] webbrowser.py: selection of browser
* Lib/webbrowser.py
Only include graphic browsers in _tryorder if DISPLAY is set. Also,
included skipstone support, as suggested by Fred in the mentioned bug.
* Misc/NEWS
Mention fix and skipstone inclusion.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r-- | Lib/webbrowser.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index efdebdc..cb9dbb3 100644 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -261,8 +261,7 @@ class WindowsDefault: # the TERM and DISPLAY cases, because we might be running Python from inside # an xterm. if os.environ.get("TERM") or os.environ.get("DISPLAY"): - _tryorder = ["galeon", "mozilla", "netscape", "kfm", - "grail", "links", "lynx", "w3m",] + _tryorder = ["links", "lynx", "w3m"] # Easy cases first -- register console browsers if we have them. if os.environ.get("TERM"): @@ -278,6 +277,9 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"): # X browsers have more in the way of options if os.environ.get("DISPLAY"): + _tryorder = ["galeon", "skipstone", "mozilla", "netscape", + "kfm", "grail"] + _tryorder + # First, the Netscape series if _iscommand("mozilla"): register("mozilla", None, Netscape("mozilla")) @@ -293,6 +295,11 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"): if _iscommand("galeon"): register("galeon", None, Galeon("galeon")) + # Skipstone, another Gtk/Mozilla based browser + if _iscommand("skipstone"): + register("skipstone", None, GenericBrowser( + "skipstone '%s' >/dev/null &")) + # Konqueror/kfm, the KDE browser. if _iscommand("kfm") or _iscommand("konqueror"): register("kfm", Konqueror, Konqueror()) |