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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s