Hi,
I propose a small change in webbrowse.py module. At the present time:
"""
Under Unix, if the environment variable BROWSER exists, it is interpreted to override the platform default list of browsers,...
"""
(extract from Python-2.4/Doc/html/lib/module-webbrowser.html)
I propose the following change:
'''
--- webbrowser.py 2005-03-18 17:43:58.736854784 -0300
+++ webbrowser.py.new 2005-03-18 17:29:57.016815680 -0300
@@ -355,7 +355,7 @@
if "BROWSER" in os.environ:
# It's the user's responsibility to register handlers for any unknown
# browser referenced by this value, before calling open().
- _tryorder = os.environ["BROWSER"].split(os.pathsep)
+ _tryorder = os.environ["BROWSER"].split(os.pathsep) + _tryorder for cmd in _tryorder:
if not cmd.lower() in _browsers:'''
This changes the semantics a bit, but in a positive way:
- When the environment variable BROWSER is messed up, there is
no reason not to try the other detected browser alternatives
- If the BROWSER variable is Ok, than it is respectedIf nobody stand against it, or would like to propose an alternative (optimized) implementation, I can submit a patch to sf to alter both code and documentation.
I'd appreciate to know if you consider this a bug or a new feature ?
I consider this a bug:
"""
The webbrowser module provides a very high-level interface to allow displaying Web-based documents to users. The controller objects are easy to use and are platform-independent. Under most circumstances, simply calling the open() function from this module will do the right thing.
"""
(extract from Python-2.4/Doc/html/lib/module-webbrowser.html)
Ignoring valid *already* detected browsers, due to a broken environment variable does not sound like _do the right thing_. <wink>
cheers, Senra
-- Rodrigo Senra MSc Computer Engineer [EMAIL PROTECTED] GPr Sistemas Ltda http://www.gpr.com.br
_______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
