FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-102690: Use Edge as fallback in webbrowser instead of IE by DBJim · Pull Request #102691 · python/cpython · GitHub

Repository navigation

12 changes: 8 additions & 4 deletions Lib/webbrowser.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -542,11 +542,15 @@ def register_standard_browsers():
# First try to use the default Windows browser
register("windows-default", WindowsDefault)

# Detect some common Windows browsers, fallback to IE
iexplore = os.path.join(os.environ.get("PROGRAMFILES", "C:\\Program Files"),
"Internet Explorer\\IEXPLORE.EXE")
# Detect some common Windows browsers, fallback to Microsoft Edge
# location in 64-bit Windows
edge64 = os.path.join(os.environ.get("PROGRAMFILES(x86)", "C:\\Program Files (x86)"),
"Microsoft\\Edge\\Application\\msedge.exe")
# location in 32-bit Windows
edge32 = os.path.join(os.environ.get("PROGRAMFILES", "C:\\Program Files"),
Comment thread
zooba marked this conversation as resolved.
"Microsoft\\Edge\\Application\\msedge.exe")
for browser in ("firefox", "firebird", "seamonkey", "mozilla",
"netscape", "opera", iexplore):
"opera", edge64, edge32):
if shutil.which(browser):
register(browser, None, BackgroundBrowser(browser))
else:
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update :mod:`webbrowser` to fall back to Microsoft Edge instead of Internet Explorer.

Back | FazBrowse Home | New Git URL