Month: July 2015

IE as a UI

While I still believe Microsoft’s decision to include a browser in the OS is a bad one it does open up an interesting use case; using IE as the user interface for Python. Like a lot of MS applications, IE can be controlled through a COM interface so with few lines we can start IE and point it at whatever URL we need.

import win32com
ie = win32com.Dispatch("InternetExplorer.Application")
ie.AddressBar = ie.MenuBar = ie.StatusBar = ie.ToolBar = False
ie.visible = True

As wonderful as this website is, it isn’t a user interface. Using a micro web framework you can create a local webserver and then navigate IE to this. Use a template language to make life easier and suddenly you’ve got a flexible UI for a few minutes work.