Open HTML file in IE
mark_s_robey at hotmail.com
Fri Jul 20 07:09:13 CEST 2007
On Jul 19, 5:59 am, brad <byte8b... at gmail.com> wrote:
> gravey wrote:
> > Hello.
> > Apologies if this is a basic question, but I want to open a HTML
> > file from my local drive (is generated by another Python script)
> > in Internet Explorer. I've had a look at the webbrowser module and
> > this doesn't seem to be what I need. Any help much appreciated.
> You may try something like this example:
> import time
> import win32com.client
> wie = win32com.client.Dispatch('InternetExplorer.Application')
> # Make IE Window Visible.
> wie.Visible = 1
> # Open this URL
> # Print 'Busy' while Busy.
> while wie.Busy:
> print 'Busy'
> # Sleep 2 secs, then go home.
> # Sleep 2 secs, then go back.
> # Refresh the page
> # Close IE Window
Thanks to all who replied. All your approaches work but (!!) the HTML
from the URL. The URL looks like this:
parses it. I'm assuming that the location object has some kind of
Windows equivalent that might be set using win32com.client. Can anyone
shed any light on this?
More information about the Python-list