I'm trying to use mshtml (i.e., the Microsoft HTML parser used in IE) from a
Python client, but as this is my first foray into using Python with COM (or on
Win32 for that matter), I'm having some difficulty.  I started by using makepy
on mshtml.tlb to create a wrapper.

Here's a transcript from within the shell:

>>> import win32com.client
>>> o = win32com.client.Dispatch('htmlfile')
>>> o
<win32com.gen_py.Microsoft HTML Object Library.DispHTMLDocument>

This looks OK so far, AFAIK.  Now, the next step is to open a document.  The
python seems to recognize the method:

>>> o.createDocumentFromUrl
<method DispHTMLDocument.createDocumentFromUrl of DispHTMLDocument instance at
01F10EDC>

But when I try to actually use the method:

doc = o.createDocumentFromUrl('192.168.1.1', None)

a fault occurs inside mshtml.dll that kills pythonwin.  If I do this inside a
.py file and wrap it in a 'try', it still kills pythonwin (or python, if I'm at
a prompt). 

Am I doing something wrong?

I'm using ActivePython build 202 on Win98 (4.10.2222).  Any help would be
appreciated.

-- 
Dave Seidel
[EMAIL PROTECTED]


_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to