The comtypes package

comtypes is a pure Python COM package based on the ctypes ffi foreign function library. ctypes is included in Python 2.5 and later, it is also available for Python 2.4 as separate download.

While the pywin32 package contains superior client side support for dispatch based COM interfaces, it is not possible to access custom COM interfaces unless they are wrapped in C++-code.

The comtypes package makes it easy to access and implement both custom and dispatch based COM interfaces.

Functionalities

Downloads

The comtypes project is hosted on GitHub. Releases can be downloaded from the GitHub releases section.

Installation

comtypes is available on PyPI and can be installed with pip:

pip install comtypes