This is a Win10 machine.
I have a file on disk called "test.html". When I run this in a terminal window C:\>test.html my default browser opens, and that is chrome.
Now I do the same in python
C:\> copy con test.py
import webbrowser
webbrowser.open('http://www.python.org')
^Z
1 file(s) copied.
C:\>python test.py
and Chrome, the default browser opens
But when I take an HTML response from an API call, and do the same webbrowser.open(...) then Internet Explorer opens. Not Edge, not Chrome, but Internet explorer.
How? It's almost as if there is something in the response that tells it "open with IE" except that if do it manually from the command line with C:\>response.html it opens chrome too.
Where is this instruction to open Internet Explorer coming from?
webborwser.open()?webbrowser.open()is only documented as supporting opening a URL, and best effort of opening a file, it does not support opening a HTML string directly, I'd expect nearly any behavior when using it incorrectly.