[python-win32] Yet another python-com bridge (wincom.pyd)

Lijun Qin qinlj at solidshare.com
Mon Mar 29 20:53:49 EST 2004


Hi,

I've uploaded the source file,
http://www.solidshare.com/python/wincom_src.zip, the precompiled binary
(platform VC 7.1) in http://www.solidshare.com/python/wincom.zip.
You'll need boost lib (http://www.boost.org) and comet
(http://www.lambdasoft.dk/comet) to compile the source.

Warning: I'm currently in the process of convert the code from ATL to comet,
so the source file is just a reference for interested people, you can not
just compile the code and get the binary. I'll complete the convertion in
the next few monthes, if I can get some spare time.
If there is some comet guy, it'll take about 1 week to complete the
conversion and test, I think.

Regards
Lijun Qin

> -----Original Message-----
> From: Lijun Qin [mailto:qinlj at solidshare.com]
> Sent: Saturday, March 27, 2004 6:32 PM
> To: python-win32 at python.org
> Subject: [python-win32] Yet another python-com bridge (wincom.pyd)
>
>
> Hi all,
>
> Here is my own python-com bridge (named wincom), which support Python at
as
> both server and client side, support C++ access python use vtable
interface
> when the interface is a dual interface (similar to universal_gateway
featuer
> of win32all).
> One of the feature of wincom is that there is only a simple pyd file
> (wincom.pyd, and runtime boost_python23.dll) to deply, unlike win32-all
> package you'll need deploy a whole package.
> Another feature of wincom is that it's use is quite simple, a typelib is
in
> the center, and all objects in the typelib can be easily imported, like
> this:
>
> import wincom
> msxml = wincom.typelib('{F5078F18-C551-11D3-89B9-0000F81FE221}', 4, 0)
>
> after these lines, all objects in the msxml4.0 typelib can be easily
> accessed, like this:
>
> self.dom = msxml.DOMDocument40()        #create a CoClass use it's name
> if not self.dom.load(file_name):
>             raise RuntimeError, "load xml file failed"
>
> self.node = self.dom.documentElement        #COM object property mapped to
> python attribute
> self.id = self.node.getAttribute('id')             #COM object function
> mapped to python method
>
> self.my_objs = []
> for my_obj_node in self.node.selectNodes("//my_obj"):    #COM enumratable
> mapped to python iter object
>     self.my_objs.append(my_obj_class(self, my_obj_node))
>
> You can download the file from
http://www.solidshare.com/python/wincom.pyd,
> source file is not included, but if peoples like it, I'll consider setup a
> project in sourceforge or somewhere else.
>
> Lijun Qin
>
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32




More information about the Python-win32 mailing list