Internet Explorer and Python/COM

Roger Upole cb750chris at email.msn.com
Sun Jul 2 18:53:41 EDT 2000


Here's a small sample of how to navigate to a URL.
>>> import win32com.client
>>> x=win32com.client.Dispatch('InternetExplorer.Application.1')
>>> x.Visible=1
>>> x.Navigate('http://www.python.org')
If you run makepy on Microsoft Internet Controls, the file generated in
Python\win32com\genpy will show all the properties and methods
available for this object.
    HTH
         Roger Upole


Moshe Zadka <moshez at math.huji.ac.il> wrote in message
news:Pine.GSO.4.10.10007022217420.19085-100000 at sundial...
>
> I'm really a beginner in Windows COM programming, so I'm sorry if my
> question doesn't make sense.
>
> Can I use Python to run Internet Explorer and control it via COM? I mean,
> telling it things like "Display this URL" or "Render this HTML".
> (Maybe even putting a hook on URL displaying, so my Python program is
> notified when the URL the browser is displaying changes)
>
> --
> Moshe Zadka <moshez at math.huji.ac.il>
> There is no GOD but Python, and HTTP is its prophet.
>
>







More information about the Python-list mailing list