Downloading pages from a Windows Intranet
R.Marquez
ny_r_marquez at yahoo.com
Wed May 1 16:32:43 EDT 2002
Would it help to know that I am trying this in NT4 using Python 2.2.1
and Win32all-146 package? Oh, and I meant DispatchWithEvents, not
DispatchWithEvents. Does this work for any one? Thanks.
ny_r_marquez at yahoo.com (R.Marquez) wrote in message news:<8a27e309.0204290708.1061659 at posting.google.com>...
> After taking a look at my options (and considering my humble state of
> expertise)
> I decided that the easiest route for me to work around the
> authentication issue was to use COM to control IE. It worked.
> Using win32com.Distpatch to navigate to the pages works well for my
> needs inside our intranet.
>
> However, trying to use DispatchWithEvents (to make a more generic way
> of waiting for a page to load for use outside our intranet) has given
> me problems.
>
> As suggested, I created a simple class to recieve the events.
> Something like:
>
> class IEEvents:
> def OnBeginDownload(self):
> print "Download began"
> def OnDownloadComplete(self):
> print "Download completed"
> def ...
>
> Then, when I try this:
>
> import win32com.client
> ie = win32com.client.DistpatchWithEvents('InternetExplorer.Application',
> IEEvents)
> ie.Navigate(someurl)
>
> I see that the OnBeginDownload event gets fired, but that is it. IE
> seems to be help up by something so that it can not complete the
> Navigation. If I kill Python at that point, IE proceeds to finish the
> download of the page and displays it. Any suggestions?
>
> (PS: I stil hope that one day someone savy enough with the use of
> calldll will be able to make a module to control the WININET.DLL and
> share it with the rest of us. :-)
More information about the Python-list
mailing list