Open IE Browser Window

browser, internet-explorer, python

Solution

More elegant code:

import webbrowser

ie = webbrowser.get(webbrowser.iexplore)
ie.open('google.com')

Problem

The `webbrowser` library provides a convenient way to launch a URL with a browser window through the `webbrowser.open()` method. Numerous browser types are available, but there does not appear to be an explicit way to launch Internet Explorer when running python on windows. `WindowsDefault` only works if Internet Explorer is set as the default browser, which is not an assumption I can make. Is there a way to explicitly launch a URL into Internet Explorer without reverting to windows API calls?

Original source