I was to suggest to use the PATHEXT variable instead of a hardcoded list of extensions, but does all this work at all? For example, I added a "opera.bat" in my current directory. a browser named 'opera' was registered, but it did not start! >>> webbrowser.get('opera').open('http://www.google.com') False And indeed, the subprocess module does not start .bat files unless "shell=True" is given.
Oh, sorry. Shouldn't do too many things at once. Well, I think there aren't many webbrowsers that come as a .com file, for example. And as Amaury shows, the patch can't be applied as is anyway.