Another MSIE Python Question

Peter Hansen peter at engcorp.com
Sat Jun 19 11:12:19 EDT 2004


Ralph A. Gable wrote:

> I am opening MSIE6 with this code:
> 
>     ie=Dispatch('InternetExplorer.Application.1')
>     ie.Navigate(url)
>     while ie.Busy:
>         time.sleep(0.1)
>     ied=ie.Document
>     while ied.ReadyState != 'complete':
>         time.sleep(0.1)
>         
>     ieh=ied.documentElement.outerHTML
> 
> 
> When opening Word or Excel, and using Dispatch('Word.Application') or 
> Dispatch('Excel.Application'), the app comes up and is available and can be 
> brought up on the screen by setting .Visible = 1. When using the above code,
> IE will not come up. I have to open IE by clicking on its icon and then the
> above code will work. If I don't do that I get a stack dump and my python
> program crashes.
> 
> Any help would be appreciated.

Based on the above description, is it possible that the fact
that you aren't doing "ie.Visible = 1" is responsible?

Also, please include the traceback when saying that your Python program
crashes... this usually eliminates whole classes of possible causes,
and often points directly to the trouble for someone who's been there
before.

-Peter



More information about the Python-list mailing list