python’s webbrowser launches IE, instead of default browser, on Windows relative path

My main issue was a bad URL by attempting prepend file:// to a relative path. It can be fixed with this: webbrowser.open(‘file://’ + os.path.realpath(filename)) Using webbrowser.open will try multiple methods until one “succeeds”, which is a loose definition. The WindowsDefault class calls os.startfile() which fails and returns False. I can verify that by entering the … Read more