comtypes 1.4.5__zip → 1.4.7__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {comtypes-1.4.5 → comtypes-1.4.7}/CHANGES.txt +30 -0
- {comtypes-1.4.5/comtypes.egg-info → comtypes-1.4.7}/PKG-INFO +28 -36
- {comtypes-1.4.5 → comtypes-1.4.7}/README.md +26 -34
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/GUID.py +24 -24
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/__init__.py +1 -1
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_memberspec.py +4 -12
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_post_coinit/bstr.py +13 -6
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/automation.py +21 -54
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/client/__init__.py +2 -9
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/client/_code_cache.py +2 -2
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/hints.pyi +8 -18
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/persist.py +19 -3
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/shelllink.py +72 -21
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_client.py +9 -0
- comtypes-1.4.7/comtypes/test/test_monikers.py +70 -0
- comtypes-1.4.7/comtypes/test/test_persist.py +40 -0
- comtypes-1.4.7/comtypes/test/test_recordinfo.py +79 -0
- comtypes-1.4.7/comtypes/test/test_shelllink.py +133 -0
- comtypes-1.4.7/comtypes/test/test_storage.py +127 -0
- comtypes-1.4.7/comtypes/test/test_typeannotator.py +127 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/codegenerator/codegenerator.py +0 -1
- comtypes-1.4.7/comtypes/tools/codegenerator/modulenamer.py +23 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/codegenerator/typeannotator.py +27 -22
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/tlbparser.py +22 -24
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/typedesc_base.py +2 -8
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/typeinfo.py +57 -56
- {comtypes-1.4.5 → comtypes-1.4.7/comtypes.egg-info}/PKG-INFO +28 -36
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes.egg-info/SOURCES.txt +7 -1
- {comtypes-1.4.5 → comtypes-1.4.7}/setup.cfg +1 -1
- comtypes-1.4.5/comtypes/tools/codegenerator/modulenamer.py +0 -24
- {comtypes-1.4.5 → comtypes-1.4.7}/LICENSE.txt +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/MANIFEST.in +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_comobject.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_idl_stuff.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_meta.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_npsupport.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_post_coinit/__init__.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_post_coinit/misc.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_post_coinit/unknwn.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_py_instance_method.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_safearray.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/_tlib_version_checker.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/clear_cache.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/client/_constants.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/client/_events.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/client/_generate.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/client/dynamic.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/client/lazybind.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/connectionpoints.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/errorinfo.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/git.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/hresult.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/logutil.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/messageloop.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/patcher.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/safearray.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/server/__init__.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/server/automation.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/server/connectionpoints.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/server/inprocserver.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/server/localserver.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/server/register.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/server/w_getopt.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/stream.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/TestComServer.idl +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/TestComServer.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/TestComServer.tlb +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/TestDispServer.idl +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/TestDispServer.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/TestDispServer.tlb +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/__init__.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/find_memleak.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/mylib.idl +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/mylib.tlb +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/mytypelib.idl +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/runtests.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/setup.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_BSTR.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_DISPPARAMS.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_GUID.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_QueryService.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_agilent.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_avmc.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_basic.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_casesensitivity.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_clear_cache.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_client_dynamic.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_client_regenerate_modules.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_collections.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_comserver.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_createwrappers.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_dict.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_dispifc_records.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_dispifc_safearrays.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_dispinterface.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_dyndispatch.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_excel.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_findgendir.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_getactiveobj.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_ie.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_ienum.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_imfattributes.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_inout_args.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_jscript.js +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_midl_safearray_create.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_msscript.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_npsupport.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_outparam.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_propputref.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_pump_events.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_safearray.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_sapi.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_server.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_showevents.py +0 -0
- /comtypes-1.4.5/comtypes/test/test_istream.py → /comtypes-1.4.7/comtypes/test/test_stream.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_subinterface.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_typeinfo.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_urlhistory.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_variant.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_win32com_interop.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_wmi.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/test_word.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/test/urlhist.tlb +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/__init__.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/codegenerator/__init__.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/codegenerator/helpers.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/codegenerator/namespaces.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/codegenerator/packing.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/tools/typedesc.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/util.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes/viewobject.py +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes.egg-info/dependency_links.txt +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes.egg-info/entry_points.txt +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/comtypes.egg-info/top_level.txt +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/pyproject.toml +0 -0
- {comtypes-1.4.5 → comtypes-1.4.7}/setup.py +0 -0
|
@@ -3,47 +3,23 @@
|
|
|
3
3
|
# generated by 'xml2py'
|
|
4
4
|
# flags '..\tools\windows.xml -m comtypes -m comtypes.automation -w -r .*TypeLibEx -r .*TypeLib -o typeinfo.py'
|
|
5
5
|
# then hacked manually
|
|
6
|
-
import os
|
|
7
6
|
import sys
|
|
8
|
-
from typing import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Optional,
|
|
13
|
-
overload,
|
|
14
|
-
Sequence,
|
|
15
|
-
Type,
|
|
16
|
-
TypeVar,
|
|
17
|
-
Tuple,
|
|
18
|
-
Union as _UnionT,
|
|
19
|
-
)
|
|
7
|
+
from typing import Any, overload, TypeVar, TYPE_CHECKING
|
|
8
|
+
from typing import List, Type, Tuple
|
|
9
|
+
from typing import Optional, Union as _UnionT
|
|
10
|
+
from typing import Callable, Sequence
|
|
20
11
|
import weakref
|
|
21
12
|
|
|
22
13
|
import ctypes
|
|
23
14
|
from ctypes import HRESULT, POINTER, _Pointer, byref, c_int, c_void_p, c_wchar_p
|
|
24
15
|
from ctypes.wintypes import DWORD, LONG, UINT, ULONG, WCHAR, WORD
|
|
25
|
-
from comtypes import
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
IUnknown,
|
|
33
|
-
STDMETHOD,
|
|
34
|
-
TYPE_CHECKING,
|
|
35
|
-
)
|
|
36
|
-
from comtypes.automation import (
|
|
37
|
-
DISPID,
|
|
38
|
-
DISPPARAMS,
|
|
39
|
-
EXCEPINFO,
|
|
40
|
-
LCID,
|
|
41
|
-
SCODE,
|
|
42
|
-
VARIANT,
|
|
43
|
-
VARIANTARG,
|
|
44
|
-
VARTYPE,
|
|
45
|
-
tagVARIANT,
|
|
46
|
-
)
|
|
16
|
+
from comtypes import BSTR, _CData, COMMETHOD, GUID, IID, IUnknown, STDMETHOD
|
|
17
|
+
from comtypes.automation import DISPID, LCID, SCODE
|
|
18
|
+
from comtypes.automation import DISPPARAMS, EXCEPINFO, VARIANT, VARIANTARG, VARTYPE
|
|
19
|
+
|
|
20
|
+
if TYPE_CHECKING:
|
|
21
|
+
from comtypes import hints # type: ignore
|
|
22
|
+
|
|
47
23
|
|
|
48
24
|
_CT = TypeVar("_CT", bound=_CData)
|
|
49
25
|
_T_IUnknown = TypeVar("_T_IUnknown", bound=IUnknown)
|
|
@@ -242,7 +218,9 @@ class ITypeLib(IUnknown):
|
|
|
242
218
|
"""Return an ITypeComp pointer."""
|
|
243
219
|
...
|
|
244
220
|
|
|
245
|
-
def GetDocumentation(
|
|
221
|
+
def GetDocumentation(
|
|
222
|
+
self, index: int
|
|
223
|
+
) -> Tuple[str, Optional[str], int, Optional[str]]:
|
|
246
224
|
"""Return documentation for a type description."""
|
|
247
225
|
...
|
|
248
226
|
|
|
@@ -250,11 +228,11 @@ class ITypeLib(IUnknown):
|
|
|
250
228
|
"""Release TLIBATTR"""
|
|
251
229
|
...
|
|
252
230
|
|
|
253
|
-
_GetLibAttr: Callable[[], "_Pointer[TLIBATTR]"]
|
|
254
|
-
|
|
255
231
|
def GetLibAttr(self) -> "TLIBATTR":
|
|
256
232
|
"""Return type library attributes"""
|
|
257
|
-
return _deref_with_release(
|
|
233
|
+
return _deref_with_release(
|
|
234
|
+
self._GetLibAttr(), self.ReleaseTLibAttr # type: ignore
|
|
235
|
+
)
|
|
258
236
|
|
|
259
237
|
def IsName(self, name: str, lHashVal: int = 0) -> Optional[str]:
|
|
260
238
|
"""Check if there is type information for this name.
|
|
@@ -364,27 +342,30 @@ class ITypeInfo(IUnknown):
|
|
|
364
342
|
"""Releases a VARDESC previously returned by VarDesc"""
|
|
365
343
|
...
|
|
366
344
|
|
|
367
|
-
|
|
368
|
-
_GetFuncDesc: Callable[[int], "_Pointer[FUNCDESC]"]
|
|
369
|
-
_GetVarDesc: Callable[[int], "_Pointer[VARDESC]"]
|
|
370
|
-
_GetDocumentation: Callable[[int], Tuple[str, str, int, Optional[str]]]
|
|
371
|
-
|
|
372
|
-
def GetTypeAttr(self):
|
|
345
|
+
def GetTypeAttr(self) -> "TYPEATTR":
|
|
373
346
|
"""Return the TYPEATTR for this type"""
|
|
374
|
-
return _deref_with_release(
|
|
347
|
+
return _deref_with_release(
|
|
348
|
+
self._GetTypeAttr(), self.ReleaseTypeAttr # type: ignore
|
|
349
|
+
)
|
|
375
350
|
|
|
376
|
-
def GetDocumentation(
|
|
351
|
+
def GetDocumentation(
|
|
352
|
+
self, memid: int
|
|
353
|
+
) -> Tuple[str, Optional[str], int, Optional[str]]:
|
|
377
354
|
"""Return name, docstring, helpcontext, and helpfile for 'memid'."""
|
|
378
|
-
name, doc,
|
|
379
|
-
return fix_name(name), fix_name(doc),
|
|
355
|
+
name, doc, helpctx, helpfile = self._GetDocumentation(memid) # type: ignore
|
|
356
|
+
return fix_name(name), fix_name(doc), helpctx, fix_name(helpfile)
|
|
380
357
|
|
|
381
|
-
def GetFuncDesc(self, index):
|
|
358
|
+
def GetFuncDesc(self, index: int) -> "FUNCDESC":
|
|
382
359
|
"""Return FUNCDESC for index"""
|
|
383
|
-
return _deref_with_release(
|
|
360
|
+
return _deref_with_release(
|
|
361
|
+
self._GetFuncDesc(index), self.ReleaseFuncDesc # type: ignore
|
|
362
|
+
)
|
|
384
363
|
|
|
385
|
-
def GetVarDesc(self, index):
|
|
364
|
+
def GetVarDesc(self, index: int) -> "VARDESC":
|
|
386
365
|
"""Return VARDESC for index"""
|
|
387
|
-
return _deref_with_release(
|
|
366
|
+
return _deref_with_release(
|
|
367
|
+
self._GetVarDesc(index), self.ReleaseVarDesc # type: ignore
|
|
368
|
+
)
|
|
388
369
|
|
|
389
370
|
def GetNames(self, memid: int, count: int = 1) -> List[str]:
|
|
390
371
|
"""Return names for memid"""
|
|
@@ -478,13 +459,12 @@ class ICreateTypeLib2(ICreateTypeLib):
|
|
|
478
459
|
class ICreateTypeInfo(IUnknown):
|
|
479
460
|
_iid_ = GUID("{00020405-0000-0000-C000-000000000046}")
|
|
480
461
|
# C:/Programme/gccxml/bin/Vc71/PlatformSDK/oaidl.h 915
|
|
481
|
-
_SetFuncAndParamNames: Callable[[int, "ctypes.Array[c_wchar_p]", int], int]
|
|
482
462
|
|
|
483
463
|
def SetFuncAndParamNames(self, index: int, *names: str) -> int:
|
|
484
464
|
rgszNames = (c_wchar_p * len(names))()
|
|
485
465
|
for i, n in enumerate(names):
|
|
486
466
|
rgszNames[i] = n
|
|
487
|
-
return self._SetFuncAndParamNames(index, rgszNames, len(names))
|
|
467
|
+
return self._SetFuncAndParamNames(index, rgszNames, len(names)) # type: ignore
|
|
488
468
|
|
|
489
469
|
|
|
490
470
|
class IRecordInfo(IUnknown):
|
|
@@ -500,6 +480,27 @@ class IRecordInfo(IUnknown):
|
|
|
500
480
|
# XXX Should SysFreeString the array contents. How to?
|
|
501
481
|
return result
|
|
502
482
|
|
|
483
|
+
if TYPE_CHECKING:
|
|
484
|
+
# fmt: off
|
|
485
|
+
# def RecordInit
|
|
486
|
+
# def RecordClear
|
|
487
|
+
def RecordCopy( # noqa
|
|
488
|
+
self, pvExisting: hints.Incomplete, pvNew: hints.Incomplete
|
|
489
|
+
) -> hints.Hresult: ...
|
|
490
|
+
def GetGuid(self) -> GUID: ... # noqa
|
|
491
|
+
def GetName(self) -> str: ... # noqa
|
|
492
|
+
def GetSize(self) -> int: ... # noqa
|
|
493
|
+
def GetTypeInfo(self) -> ITypeInfo: ... # noqa
|
|
494
|
+
# def GetField
|
|
495
|
+
# def GetFieldNoCopy
|
|
496
|
+
# def PutField
|
|
497
|
+
# def PutFieldNoCopy
|
|
498
|
+
def IsMatchingType(self, value: "IRecordInfo") -> bool: ... # noqa
|
|
499
|
+
# def RecordCreate
|
|
500
|
+
def RecordCreateCopy(self, pvSource: hints.Incomplete) -> int: ... # noqa
|
|
501
|
+
def RecordDestroy(self, pvRecord: hints.Incomplete) -> hints.Hresult: ... # noqa
|
|
502
|
+
# fmt: on
|
|
503
|
+
|
|
503
504
|
|
|
504
505
|
IRecordInfo._methods_ = [
|
|
505
506
|
COMMETHOD([], HRESULT, "RecordInit", (["in"], c_void_p, "pvNew")),
|
|
@@ -1201,7 +1202,7 @@ class N11tagELEMDESC5DOLLAR_204E(ctypes.Union):
|
|
|
1201
1202
|
class tagPARAMDESC(ctypes.Structure):
|
|
1202
1203
|
# C:/Programme/gccxml/bin/Vc71/PlatformSDK/oaidl.h 609
|
|
1203
1204
|
if TYPE_CHECKING:
|
|
1204
|
-
pparamdescex: "tagPARAMDESCEX"
|
|
1205
|
+
pparamdescex: "_Pointer[tagPARAMDESCEX]"
|
|
1205
1206
|
wParamFlags: int
|
|
1206
1207
|
|
|
1207
1208
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: comtypes
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.7
|
|
4
4
|
Summary: Pure Python COM package
|
|
5
5
|
Home-page: https://github.com/enthought/comtypes
|
|
6
6
|
Download-URL: https://github.com/enthought/comtypes/releases
|
|
@@ -13,7 +13,7 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
15
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
-
Requires-Python: >=3.
|
|
16
|
+
Requires-Python: >=3.8
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE.txt
|
|
19
19
|
|
|
@@ -24,47 +24,40 @@ License-File: LICENSE.txt
|
|
|
24
24
|
[](https://github.com/enthought/comtypes/stargazers) [](https://github.com/enthought/comtypes/network/members)
|
|
25
25
|
[](https://tidelift.com/subscription/pkg/pypi-comtypes?utm_source=pypi-comtypes&utm_medium=readme)
|
|
26
26
|
|
|
27
|
-
## About
|
|
28
27
|
|
|
29
|
-
`comtypes` is a lightweight
|
|
28
|
+
`comtypes` is a lightweight pure Python [COM](https://learn.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal) package based on the [`ctypes`](https://docs.python.org/library/ctypes.html) foreign function interface library.
|
|
30
29
|
|
|
31
|
-
`comtypes` allows to define, call, and implement custom and dispatch-based COM interfaces in pure
|
|
30
|
+
`comtypes` allows you to define, call, and implement custom and dispatch-based COM interfaces in pure Python.
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
`comtypes` requires Windows and Python 3.8 or later.
|
|
33
|
+
- Version [1.4.6](https://pypi.org/project/comtypes/1.4.6/) is the last version to support Python 3.7.
|
|
34
|
+
- Version [1.2.1](https://pypi.org/project/comtypes/1.2.1/) is the last version to support Python 2.7 and 3.3–3.6.
|
|
35
|
+
- `comtypes` does not work with Python 3.8.1 as reported in [GH-202](https://github.com/enthought/comtypes/issues/202). This bug has been fixed in Python >= 3.8.2.
|
|
36
|
+
- Certain `comtypes` functions may not work correctly in Python 3.8 and 3.9 as reported in [GH-212](https://github.com/enthought/comtypes/issues/212). This bug has been fixed in Python >= 3.10.10 and >= 3.11.2.
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
- [`comtypes==1.2.1`](https://pypi.org/project/comtypes/1.2.1/) is the last version supporting `Python` 2.7 and 3.3-3.6.
|
|
37
|
-
- In `Python` 3.7.6 and 3.8.1, `comtypes` would not work as reported in [GH-202](https://github.com/enthought/comtypes/issues/202).
|
|
38
|
-
This bug has been fixed in `Python` >= 3.7.7 and >= 3.8.2.
|
|
39
|
-
- In `Python` 3.8 and 3.9, some of `comtypes` functionalities may not work correctly as reported in [GH-212](https://github.com/enthought/comtypes/issues/212).
|
|
40
|
-
This bug has been fixed in `Python` >= 3.10.10 and >= 3.11.2.
|
|
41
|
-
|
|
42
|
-
## Where to get it
|
|
43
|
-
|
|
44
|
-
The source code is currently hosted on GitHub at:
|
|
45
|
-
https://github.com/enthought/comtypes
|
|
46
|
-
|
|
47
|
-
An installer for the latest released version is available at the [Python Package Index (PyPI)](https://pypi.org/project/comtypes).
|
|
38
|
+
## Installation
|
|
48
39
|
|
|
40
|
+
`comtypes` is available on [PyPI](https://pypi.org/project/comtypes) and can be installed with `pip`:
|
|
49
41
|
```sh
|
|
50
42
|
# PyPI
|
|
51
43
|
pip install comtypes
|
|
52
44
|
```
|
|
53
45
|
|
|
54
|
-
|
|
46
|
+
The source code is currently hosted [here](https://github.com/enthought/comtypes) on GitHub.
|
|
47
|
+
|
|
48
|
+
### Dependencies
|
|
55
49
|
|
|
56
|
-
`comtypes`
|
|
50
|
+
`comtypes` is a pure Python package — it has no additional required dependencies.
|
|
57
51
|
|
|
58
|
-
Optional
|
|
59
|
-
- to process arrays as `numpy`'s `ndarray
|
|
60
|
-
-
|
|
52
|
+
Optional functionalities can be enabled by installing:
|
|
53
|
+
- `numpy`, in order to process arrays as `numpy`'s `ndarray`.
|
|
54
|
+
- `mypy` or other static type checkers, in order to interpret type hints.
|
|
61
55
|
|
|
62
|
-
|
|
56
|
+
None of these packages, however, are required in order to run `comtypes`.
|
|
63
57
|
|
|
64
|
-
## Community
|
|
58
|
+
## Community
|
|
65
59
|
|
|
66
|
-
|
|
67
|
-
https://github.com/enthought/comtypes
|
|
60
|
+
The [GitHub repository](https://github.com/enthought/comtypes) is used for tracking issues, reporting bugs, and contributing to the codebase and documentation.
|
|
68
61
|
|
|
69
62
|
## For Enterprise
|
|
70
63
|
|
|
@@ -77,17 +70,17 @@ This project and the maintainers of thousands of other packages are working with
|
|
|
77
70
|
## Frequently Asked Questions
|
|
78
71
|
|
|
79
72
|
### Q: Why does this package not support platforms other than Windows?
|
|
80
|
-
**A:**
|
|
73
|
+
**A:** The [Microsoft Component Object Model (COM)](https://learn.microsoft.com/en-us/windows/win32/com/com-technical-overview) is a technology that is unique to Windows and is not supported on other platforms.
|
|
81
74
|
|
|
82
75
|
[The phrase _"COM is a platform-independent"_ in the MS documentation](https://learn.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal) means that COM maintains compatibility across different versions of Windows, and does NOT imply that it is supported on Linux or Mac.
|
|
83
76
|
|
|
84
|
-
|
|
77
|
+
For as long as COM is not supported outside of Windows, there is no plan to port `comtypes` to other platforms.
|
|
85
78
|
|
|
86
79
|
### Q: Why does `cannot import name 'COMError' from '_ctypes'` error occur when using this package on platforms other than Windows?
|
|
87
|
-
**A:** The [`_ctypes`](https://github.com/python/cpython/blob/main/Modules/_ctypes/_ctypes.c) is part of the internal implementation of the [`ctypes`](https://github.com/python/cpython/blob/main/Lib/ctypes/) standard library that exists for Python on all platforms.
|
|
88
|
-
However, `COMError` and COM-related features are implemented
|
|
80
|
+
**A:** The [`_ctypes`](https://github.com/python/cpython/blob/main/Modules/_ctypes/_ctypes.c) is part of the internal implementation of the [`ctypes`](https://github.com/python/cpython/blob/main/Lib/ctypes/) standard library that exists for Python on all platforms.
|
|
81
|
+
However, `COMError` and COM-related features are only implemented in Python for Windows.
|
|
89
82
|
|
|
90
|
-
In cross-platform software development, care must be taken to ensure that
|
|
83
|
+
In cross-platform software development, care must be taken to ensure that codebases that depend on `comtypes` do not execute in environments other than Windows.
|
|
91
84
|
|
|
92
85
|
### Q: Despite a script that depends on `comtypes` having run successfully before, a error (`ImportError`, `NameError`, or `SyntaxError`) is raised now, and the same error occurs again and again.
|
|
93
86
|
|
|
@@ -102,7 +95,6 @@ After deleting these partial modules and running the script again, `comtypes.cli
|
|
|
102
95
|
|
|
103
96
|
However, if the script implementation does not use `comtypes.client.GetModule` or processes generated files, it may not be a solution.
|
|
104
97
|
|
|
105
|
-
## Documentation
|
|
98
|
+
## Documentation
|
|
106
99
|
|
|
107
|
-
The documentation is currently hosted on
|
|
108
|
-
https://pythonhosted.org/comtypes
|
|
100
|
+
The documentation is currently hosted [here](https://pythonhosted.org/comtypes) on PythonHosted.
|
|
@@ -95,19 +95,25 @@ comtypes/test/test_ie.py
|
|
|
95
95
|
comtypes/test/test_ienum.py
|
|
96
96
|
comtypes/test/test_imfattributes.py
|
|
97
97
|
comtypes/test/test_inout_args.py
|
|
98
|
-
comtypes/test/test_istream.py
|
|
99
98
|
comtypes/test/test_jscript.js
|
|
100
99
|
comtypes/test/test_midl_safearray_create.py
|
|
100
|
+
comtypes/test/test_monikers.py
|
|
101
101
|
comtypes/test/test_msscript.py
|
|
102
102
|
comtypes/test/test_npsupport.py
|
|
103
103
|
comtypes/test/test_outparam.py
|
|
104
|
+
comtypes/test/test_persist.py
|
|
104
105
|
comtypes/test/test_propputref.py
|
|
105
106
|
comtypes/test/test_pump_events.py
|
|
107
|
+
comtypes/test/test_recordinfo.py
|
|
106
108
|
comtypes/test/test_safearray.py
|
|
107
109
|
comtypes/test/test_sapi.py
|
|
108
110
|
comtypes/test/test_server.py
|
|
111
|
+
comtypes/test/test_shelllink.py
|
|
109
112
|
comtypes/test/test_showevents.py
|
|
113
|
+
comtypes/test/test_storage.py
|
|
114
|
+
comtypes/test/test_stream.py
|
|
110
115
|
comtypes/test/test_subinterface.py
|
|
116
|
+
comtypes/test/test_typeannotator.py
|
|
111
117
|
comtypes/test/test_typeinfo.py
|
|
112
118
|
comtypes/test/test_urlhistory.py
|
|
113
119
|
comtypes/test/test_variant.py
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import comtypes
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def name_wrapper_module(tlib):
|
|
5
|
-
"""Determine the name of a typelib wrapper module"""
|
|
6
|
-
libattr = tlib.GetLibAttr()
|
|
7
|
-
modname = "_%s_%s_%s_%s" % (
|
|
8
|
-
str(libattr.guid)[1:-1].replace("-", "_"),
|
|
9
|
-
libattr.lcid,
|
|
10
|
-
libattr.wMajorVerNum,
|
|
11
|
-
libattr.wMinorVerNum,
|
|
12
|
-
)
|
|
13
|
-
return "comtypes.gen.%s" % modname
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def name_friendly_module(tlib):
|
|
17
|
-
"""Determine the friendly-name of a typelib module.
|
|
18
|
-
If cannot get friendly-name from typelib, returns `None`.
|
|
19
|
-
"""
|
|
20
|
-
try:
|
|
21
|
-
modulename = tlib.GetDocumentation(-1)[0]
|
|
22
|
-
except comtypes.COMError:
|
|
23
|
-
return
|
|
24
|
-
return "comtypes.gen.%s" % modulename
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/comtypes-1.4.5/comtypes/test/test_istream.py → /comtypes-1.4.7/comtypes/test/test_stream.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|