question on how to do language bindings to MSHTML's COM interface
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Sat Jan 3 04:46:21 CST 2009
quick question: is there any progress on implementing COM, in wine,
or is it necessary to grab dcom98.exe and to find the headers and the
.libs from visual studio? and have you seen these - IDL files defined
by wez, for DCOM?
p.s. nice to hear from you again, rob :)
p.p.s. below is "background" behind where i'm coming from with the
python mshtml "thing".
>> so there are some _really_ weird esoteric "sub-questions" involved, such as:
>> "what are the chances of porting pywin32 - specifically pywin32's COM
>> bindings - to linux, thanks to widl and friends"?
>> see http://sourceforge.net/projects/pywin32
>> many thanks for any advice and information.
> We already build a typelib for mshtml using widl and pywin32 can use
> that to make bindings for use at runtime, so it "should" work, but I
> fail to see the need for it at the moment.
you have to jump through a series of hoops to get there - being
honest i'm not that good at expressing some of my leaps of
multi-hoop-jumping but i'll try to give some pointers.
1) making python apps that rely on features of the win32 platform
possible under unix as well. winreg and dcom are two that _really_
spring to mind.
win32 developers are writing applications that use e.g. the registry.
i tried compiling pywin32 on linux and _instantly_ ran into a
difficulty: import _winreg.
so, i would have to go into the python 2.5 / 2.6 tarball and look at
a way of adding --enable-wine=yes and see what happens.
2) "ActiveScripting" of web pages - DOM manipulation through other
this is an _incredibly_ powerful concept that microsoft must have had
for what... ten to fifteen years, and nobody really noticed its
significance?? :) the reason for _that_ is because the main available
programming languages were utterly dire (Visual Basic).
to give you an idea of how powerful scripted DOM manipulation is, i've
implemented a project called Pyjamas-Desktop - http://pyjd.org. it's
a Desktop Widget Set UI framework. thanks to webkit-glib and
pywebkitgtk, is actually _more_ feature-capable than PyQT4 and PyGTK2
i'd just... _really_ like to see Pyjamas-Desktop be capable of running
on top of MSHTML, on windows. especially because then it would be
possible to _just_ install python (and pyjd) and, thanks to I.E. being
de-facto already _on_ windows, pyjd would just... _work_.
i wouldn't have to ask people to download a 30mb bundle of GTK.DLL,
CAIRO.DLL, PANGO.DLL, GDK.DLL, WEBKIT.DLL, ICU38.DLL plus supporting
infrastructure. the "dll hell" burden, for gtk appplications on
win32, is _immense_.
btw whilst i use pyjamas-desktop as an example, anything that has
_remotely_ a subset of the features that pyjd covers would of course
benefit from the same features [that python bindings to mshtml.dll
would bring]. pyjd is a bit of a "path-finder" as it absolutely
_hammers_ the underlying DOM model technology. [i had enormous
difficulty finding suitable technology: pykde didn't work; pygtk2 was
useless; pyqt4 was only slightly better - in the end i had to go for
More information about the wine-devel