comtypes
comtypes copied to clipboard
A pure Python, lightweight COM client and server framework, based on the ctypes Python FFI package.
Currently, when we generate a Python module from a COM type library with `client.GetModule`, the stuffs defined as `Enumeration` in the COM type library are defined in Python as aliases...
Unless there's something I'm missing or I'm just going about this entirely wrong - I'm of the impression that the value returned by all methods that _should_ return a DateTime...
Related: #345 and #475 I plan to merge this PR and release it as `comtypes==1.4.0` at the beginning of April. The reason for not merging this PR immediately is because...
I am pretty sure it is a skill issue and comtypes may have nothing to do with my problem, but I can't find why I always get the exception ``OSError:...
Hello! I know, that if Autocad is already running, we can use `comtypes.client.GetActiveObject`: ```python import comtypes.client as cc app = cc.GetActiveObject("AutoCAD.Application") ``` But what to do, if multiple instances of...
In Python3, > The `cmp()` function should be treated as gone, and the `__cmp__()` special method is no longer supported. https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons However, they are still contained in `comtypes`. https://github.com/enthought/comtypes/blob/afc6488d3386771f69ab4a3e305099e16c34f4d7/comtypes/client/lazybind.py#L129-L132 https://github.com/enthought/comtypes/blob/afc6488d3386771f69ab4a3e305099e16c34f4d7/comtypes/GUID.py#L45-L48...
Remaining tasks for #443 and #444. https://github.com/enthought/comtypes/blob/11410ce563634b9c96b6ba9b30ac95e6a3af1f97/comtypes/client/dynamic.py#L22-L34 Before PR, please format the code by `black` (the maximum number of characters per line is 88, which is the default).
Remaining tasks for #456. https://github.com/enthought/comtypes/blob/18dc2cc0175ee3da76ca2e2766157a4a0a897884/comtypes/client/__init__.py#L200-L222 - remove `if TYPE_CHECKING` bridges, like #453. - change type hints from comment annotations to inline annotations, like #453. - add `TestCase` in [`test/test_client.py`](https://github.com/enthought/comtypes/blob/master/comtypes/test/test_client.py) that...
The `from __future__ import print_function` will no longer be needed if only Python 3 is supported. The following should be removed; ```ps PS ...\comtypes> git log -1 --pretty=%H 00f231784f3ac7da83196e1c85095df6290d5b9f PS...
Since `itf` can be an unbound variable, the following code will cause several type checkers to warn. https://github.com/enthought/comtypes/blob/1615af5b56670cc811e70403dd6762a49f6fe7d1/comtypes/__init__.py#L513-L524 But this `try...except... ` clause traps a `KeyError`. Therefore, it is possible...