This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Better documentation of use of BROWSER environment variable
Type: enhancement Stage:
Components: Documentation Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: Eddie E, georg.brandl, tim.golden
Priority: normal Keywords:

Created on 2009-05-05 02:13 by Eddie E, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg87200 - (view) Author: Edmund Eyles (Eddie E) Date: 2009-05-05 02:13
The documentation for the webbrowser module at
http://www.python.org/doc/2.5/lib/module-webbrowser.html refers to the
use of the BROWSER environment variable as a means to control which
browser is run.  However, it makes no mention of how the browser name(s)
in this environment variable get translated into executables,
particularly the process by which the only directories to be searched
are those in the PATH environment variable.  

For instance, on my Windows PC where the default browser is IE, simply
setting BROWSER to 'firefox' has no effect.  I also need to add
'C:\Program Files\Mozilla Firefox' to PATH, after which Firefox actually
gets run.
msg87210 - (view) Author: Tim Golden (tim.golden) * (Python committer) Date: 2009-05-05 05:06
Edmund Eyles wrote:
> New submission from Edmund Eyles <hotel@heddonsgate.co.uk>:
> 
> The documentation for the webbrowser module at
> http://www.python.org/doc/2.5/lib/module-webbrowser.html refers to the
> use of the BROWSER environment variable as a means to control which
> browser is run.  However, it makes no mention of how the browser name(s)
> in this environment variable get translated into executables,
> particularly the process by which the only directories to be searched
> are those in the PATH environment variable.  
> 
> For instance, on my Windows PC where the default browser is IE, simply
> setting BROWSER to 'firefox' has no effect.  I also need to add
> 'C:\Program Files\Mozilla Firefox' to PATH, after which Firefox actually
> gets run.

Arguably, that is (implictly) standard behaviour on Windows: if
you invoke a program with its name alone, it generally has to
be on the PATH. However... Firefox (and IE) use the AppPaths
registry entries to ensure that someone using *shell* functionality
such as Start > Run or ShellExecute need only enter "firefox".
The webbrowser module doesn't perform this particular indirection,
hence the OP's confusion.
msg87972 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-05-17 08:55
Fixed in r72712.
History
Date User Action Args
2022-04-11 14:56:48adminsetgithub: 50185
2009-05-17 08:55:08georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg87972
2009-05-05 05:06:42tim.goldensetnosy: + tim.golden
messages: + msg87210
2009-05-05 02:13:47Eddie Ecreate