GNOME or KDE browser, depending on whether there is a session of one
of those present. Also, it tries the Windows default browser before
trying Mozilla variants.
(backport)
[#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.
Reorganize so the initialization sequences does not bite us in the foot.
(There is no good reason to discard classes that clients may want to
subclass.)
value for the 'using' parameter of the get() function
or the BROWSER environment variable, if the thing
passed in is a path (as seems to be the case with KDE)
instead of a short name, examine the available
controllers to see if we can synthesize one based on a
pre-registered controller that shares the same base
name.
get(): If the user specifies a browser we don't know about, use
_synthesize() to attempt to create a usable controller.
Some small adjustments were needed in some of the browser classes to
support this.
complaints. The new version moves most of its initialization to
package load time; it's simpler, faster, smaller, and adds support for
Mozilla and Links. Interpretation of the BROWSER variable now works
and is documented. The open_new entry point and methods are marked
"deprecated; may be removed in 2.1".
Ping apparently doesn't check in Accepted patches, so I'm doing this
for him.
According to Ping: The name of the controller class should be
"Konqueror", not "Konquerer". (See the website
http://www.konqueror.org/.)
Linux distributions which provide both KDE and Gnome set this environment
variable even if the user is not using KDE. We do *not* want to start
Konquerer if KDE is not running unless the user actually tells us to!
subset of Win32 ShellExecute's functionality. Guido wants this because
IDLE's Help -> Docs function currently crashes his machine because of a
conflict between his version of Norton AntiVirus (6.10.20) and MS's
_popen. Docs for startfile are being mailed to Fred (or just read the
docstring -- it tells the whole story).
Changed webbrowser.py to use os.startfile instead of os.popen on Windows.
Changed IDLE's EditorWindow.py to pass an absolute path for the docs
(hardcoding ShellExecute's "directory" arg to "." as used to be done let
IDLE work, but made the startfile command exceedingly obscure for other
uses -- the MS docs are terrible, of course, & still not sure I
understand it).
Note that Windows Python must link with shell32.lib now! That's where
ShellExecute lives.