[python-win32] python crash with IE Activex

Xavi Beumala xavi at code4net.com
Fri Feb 11 13:33:54 CET 2005


Hi all,
I'm playing with the demo example ActiveXWrapper_IE.py. What I want is 
avoid users access some url's. To accomplish this I'm using 
OnBeforeNavigate2 event, returning a true value should cancel the request...

<code>
def OnBeforeNavigate2(self, pDisp, URL, Flags, TargetFrameName, 
PostData, Headers, Cancel) :
         self.log.write('OnBeforeNavigate2: %s\n' % URL)

         if URL == "http://www.microsoft.com/":
             return 1
</code>

The problem is that if I return a true value, python crashes :s

I've been searching some info, but got no luck :(

Any ideas?

Thanks
Xavi Beumala


More information about the Python-win32 mailing list