comtypes

comtypes is a pure Python COM package based on the ctypes ffi foreign function library.

While the pywin32 package contains superior client side support for dispatch based COM interfaces, it is not so good to access custom COM interfaces.

comtypes, however, makes it easy to access and implement custom and dual COM interfaces.

Documentation is sparse, there are two documents which are still work in progress:

comtypes.client.html describes the high level client side support, and com_interfaces.html describes how COM interfaces are defined.

If you have ez_setup installed, you can install the lastest comtypes release with easy_install comtypes. Otherwise you should grab it from the sourceforge download page.

The development version can be get with easy_install comtypes==dev, or from the SVN repository.