comtypes 1.4.9__zip → 1.4.10__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.
Files changed (146) hide show
  1. {comtypes-1.4.9 → comtypes-1.4.10}/CHANGES.txt +19 -0
  2. {comtypes-1.4.9/comtypes.egg-info → comtypes-1.4.10}/PKG-INFO +3 -2
  3. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/GUID.py +34 -13
  4. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/__init__.py +22 -13
  5. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_comobject.py +69 -14
  6. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_memberspec.py +14 -6
  7. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_meta.py +1 -0
  8. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_post_coinit/_cominterface_meta_patcher.py +0 -1
  9. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_post_coinit/bstr.py +12 -5
  10. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_post_coinit/instancemethod.py +1 -2
  11. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_post_coinit/misc.py +59 -24
  12. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_post_coinit/unknwn.py +2 -6
  13. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_safearray.py +2 -2
  14. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/automation.py +10 -4
  15. comtypes-1.4.10/comtypes/client/__init__.py +42 -0
  16. comtypes-1.4.10/comtypes/client/_activeobj.py +46 -0
  17. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/client/_code_cache.py +6 -1
  18. comtypes-1.4.10/comtypes/client/_create.py +147 -0
  19. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/client/_events.py +57 -12
  20. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/client/_generate.py +3 -3
  21. comtypes-1.4.10/comtypes/client/_managing.py +114 -0
  22. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/client/dynamic.py +2 -3
  23. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/client/lazybind.py +10 -11
  24. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/connectionpoints.py +2 -1
  25. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/errorinfo.py +20 -7
  26. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/git.py +4 -3
  27. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/logutil.py +15 -3
  28. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/messageloop.py +1 -1
  29. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/persist.py +3 -5
  30. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/safearray.py +8 -6
  31. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/server/__init__.py +22 -4
  32. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/server/automation.py +1 -2
  33. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/server/connectionpoints.py +5 -5
  34. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/server/inprocserver.py +6 -3
  35. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/server/localserver.py +23 -5
  36. comtypes-1.4.10/comtypes/server/register.py +478 -0
  37. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/shelllink.py +13 -7
  38. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/stream.py +7 -4
  39. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/TestComServer.py +6 -7
  40. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/TestDispServer.py +4 -2
  41. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/__init__.py +1 -1
  42. comtypes-1.4.10/comtypes/test/find_memleak.py +72 -0
  43. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/runtests.py +1 -0
  44. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/setup.py +2 -1
  45. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_BSTR.py +7 -17
  46. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_GUID.py +1 -0
  47. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_QueryService.py +1 -0
  48. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_agilent.py +4 -3
  49. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_basic.py +12 -6
  50. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_clear_cache.py +1 -1
  51. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_client.py +2 -2
  52. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_client_dynamic.py +2 -2
  53. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_client_regenerate_modules.py +2 -2
  54. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_collections.py +1 -1
  55. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_comobject.py +4 -4
  56. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_comserver.py +31 -1
  57. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_dispifc_records.py +1 -1
  58. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_dispifc_safearrays.py +1 -1
  59. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_dyndispatch.py +1 -0
  60. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_findgendir.py +1 -2
  61. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_getactiveobj.py +4 -4
  62. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_ie.py +19 -6
  63. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_ienum.py +2 -2
  64. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_imfattributes.py +13 -3
  65. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_inout_args.py +1 -1
  66. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_midl_safearray_create.py +6 -4
  67. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_monikers.py +23 -9
  68. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_msscript.py +2 -1
  69. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_npsupport.py +4 -4
  70. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_outparam.py +22 -6
  71. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_persist.py +2 -4
  72. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_recordinfo.py +1 -1
  73. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_sapi.py +4 -1
  74. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_server_register.py +113 -125
  75. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_shelllink.py +2 -3
  76. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_storage.py +12 -6
  77. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_stream.py +16 -5
  78. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_subinterface.py +4 -2
  79. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_typeannotator.py +1 -2
  80. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_typeinfo.py +19 -7
  81. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_urlhistory.py +7 -4
  82. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_variant.py +3 -2
  83. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_word.py +1 -1
  84. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/codegenerator/codegenerator.py +167 -435
  85. comtypes-1.4.10/comtypes/tools/codegenerator/comments.py +79 -0
  86. comtypes-1.4.10/comtypes/tools/codegenerator/heads.py +192 -0
  87. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/codegenerator/helpers.py +3 -6
  88. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/codegenerator/namespaces.py +13 -5
  89. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/codegenerator/typeannotator.py +13 -3
  90. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/tlbparser.py +22 -23
  91. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/typedesc.py +3 -2
  92. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/typedesc_base.py +2 -2
  93. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/typeinfo.py +149 -42
  94. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/viewobject.py +2 -4
  95. {comtypes-1.4.9 → comtypes-1.4.10/comtypes.egg-info}/PKG-INFO +3 -2
  96. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes.egg-info/SOURCES.txt +5 -0
  97. {comtypes-1.4.9 → comtypes-1.4.10}/pyproject.toml +11 -19
  98. comtypes-1.4.9/comtypes/client/__init__.py +0 -323
  99. comtypes-1.4.9/comtypes/server/register.py +0 -419
  100. comtypes-1.4.9/comtypes/test/find_memleak.py +0 -76
  101. {comtypes-1.4.9 → comtypes-1.4.10}/LICENSE.txt +0 -0
  102. {comtypes-1.4.9 → comtypes-1.4.10}/MANIFEST.in +0 -0
  103. {comtypes-1.4.9 → comtypes-1.4.10}/README.md +0 -0
  104. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_npsupport.py +0 -0
  105. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_post_coinit/__init__.py +0 -0
  106. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_tlib_version_checker.py +0 -0
  107. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/_vtbl.py +0 -0
  108. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/clear_cache.py +0 -0
  109. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/client/_constants.py +0 -0
  110. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/hints.pyi +0 -0
  111. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/hresult.py +0 -0
  112. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/patcher.py +0 -0
  113. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/server/w_getopt.py +0 -0
  114. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/TestComServer.idl +0 -0
  115. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/TestComServer.tlb +0 -0
  116. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/TestDispServer.idl +0 -0
  117. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/TestDispServer.tlb +0 -0
  118. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/mylib.idl +0 -0
  119. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/mylib.tlb +0 -0
  120. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/mytypelib.idl +0 -0
  121. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_DISPPARAMS.py +0 -0
  122. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_avmc.py +0 -0
  123. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_casesensitivity.py +0 -0
  124. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_createwrappers.py +0 -0
  125. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_dict.py +0 -0
  126. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_dispinterface.py +0 -0
  127. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_excel.py +0 -0
  128. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_jscript.js +0 -0
  129. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_pump_events.py +0 -0
  130. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_safearray.py +0 -0
  131. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_server.py +0 -0
  132. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_showevents.py +0 -0
  133. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_w_getopt.py +0 -0
  134. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_win32com_interop.py +0 -0
  135. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/test_wmi.py +0 -0
  136. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/test/urlhist.tlb +0 -0
  137. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/__init__.py +0 -0
  138. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/codegenerator/__init__.py +0 -0
  139. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/codegenerator/modulenamer.py +0 -0
  140. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/tools/codegenerator/packing.py +0 -0
  141. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes/util.py +0 -0
  142. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes.egg-info/dependency_links.txt +0 -0
  143. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes.egg-info/entry_points.txt +0 -0
  144. {comtypes-1.4.9 → comtypes-1.4.10}/comtypes.egg-info/top_level.txt +0 -0
  145. {comtypes-1.4.9 → comtypes-1.4.10}/setup.cfg +0 -0
  146. {comtypes-1.4.9 → comtypes-1.4.10}/setup.py +0 -0
@@ -1,19 +1,18 @@
1
- from _ctypes import COMError
2
- from ctypes import byref, c_ubyte, POINTER
3
1
  import contextlib
4
- from pathlib import Path
5
2
  import unittest
3
+ from _ctypes import COMError
4
+ from ctypes import HRESULT, POINTER, OleDLL, byref, c_ubyte
5
+ from ctypes.wintypes import DWORD, PWCHAR
6
+ from pathlib import Path
6
7
 
7
8
  import comtypes
8
9
  import comtypes.client
9
10
 
10
-
11
11
  with contextlib.redirect_stdout(None): # supress warnings
12
12
  mod = comtypes.client.GetModule("msvidctl.dll")
13
13
 
14
14
  from comtypes.gen.MSVidCtlLib import IStorage
15
15
 
16
-
17
16
  STATFLAG_DEFAULT = 0
18
17
  STGC_DEFAULT = 0
19
18
  STGM_CREATE = 0x00001000
@@ -29,6 +28,13 @@ STREAM_SEEK_SET = 0
29
28
  STG_E_PATHNOTFOUND = -2147287038
30
29
 
31
30
 
31
+ _ole32 = OleDLL("ole32")
32
+
33
+ _StgCreateDocfile = _ole32.StgCreateDocfile
34
+ _StgCreateDocfile.argtypes = [PWCHAR, DWORD, DWORD, POINTER(POINTER(IStorage))]
35
+ _StgCreateDocfile.restype = HRESULT
36
+
37
+
32
38
  class Test_IStorage(unittest.TestCase):
33
39
  CREATE_DOC_FLAG = (
34
40
  STGM_DIRECT
@@ -44,7 +50,7 @@ class Test_IStorage(unittest.TestCase):
44
50
 
45
51
  def _create_docfile(self) -> IStorage:
46
52
  stg = POINTER(IStorage)()
47
- comtypes._ole32.StgCreateDocfile(None, self.CREATE_DOC_FLAG, 0, byref(stg))
53
+ _StgCreateDocfile(None, self.CREATE_DOC_FLAG, 0, byref(stg))
48
54
  return stg # type: ignore
49
55
 
50
56
  def test_CreateStream(self):
@@ -1,23 +1,34 @@
1
1
  import unittest as ut
2
+ from ctypes import HRESULT, POINTER, OleDLL, byref, c_ubyte, c_ulonglong, pointer
3
+ from ctypes.wintypes import BOOL, HGLOBAL, ULARGE_INTEGER
2
4
 
3
- from ctypes import POINTER, byref, c_bool, c_ubyte, c_ulonglong, oledll, pointer
4
- import comtypes
5
5
  import comtypes.client
6
6
 
7
7
  comtypes.client.GetModule("portabledeviceapi.dll")
8
8
  from comtypes.gen.PortableDeviceApiLib import IStream
9
9
 
10
-
11
10
  STGC_DEFAULT = 0
12
11
  STREAM_SEEK_SET = 0
13
12
  STREAM_SEEK_CUR = 1
14
13
  STREAM_SEEK_END = 2
15
14
 
15
+ _ole32 = OleDLL("ole32")
16
+
17
+ _CreateStreamOnHGlobal = _ole32.CreateStreamOnHGlobal
18
+ _CreateStreamOnHGlobal.argtypes = [HGLOBAL, BOOL, POINTER(POINTER(IStream))]
19
+ _CreateStreamOnHGlobal.restype = HRESULT
20
+
21
+ _shlwapi = OleDLL("shlwapi")
22
+
23
+ _IStream_Size = _shlwapi.IStream_Size
24
+ _IStream_Size.argtypes = [POINTER(IStream), POINTER(ULARGE_INTEGER)]
25
+ _IStream_Size.restype = HRESULT
26
+
16
27
 
17
28
  def _create_stream() -> IStream:
18
29
  # Create an IStream
19
30
  stream = POINTER(IStream)() # type: ignore
20
- comtypes._ole32.CreateStreamOnHGlobal(None, c_bool(True), byref(stream))
31
+ _CreateStreamOnHGlobal(None, True, byref(stream))
21
32
  return stream # type: ignore
22
33
 
23
34
 
@@ -92,7 +103,7 @@ class Test_SetSize(ut.TestCase):
92
103
  stream = _create_stream()
93
104
  stream.SetSize(42)
94
105
  pui = pointer(c_ulonglong())
95
- oledll.shlwapi.IStream_Size(stream, pui)
106
+ _IStream_Size(stream, pui)
96
107
  self.assertEqual(pui.contents.value, 42)
97
108
 
98
109
 
@@ -1,7 +1,9 @@
1
- import unittest, sys
2
- from comtypes import IUnknown, GUID
1
+ import sys
2
+ import unittest
3
3
  from ctypes import *
4
4
 
5
+ from comtypes import GUID, IUnknown
6
+
5
7
 
6
8
  def test_main():
7
9
  from test import test_support
@@ -5,12 +5,11 @@ from comtypes.tools.codegenerator import typeannotator
5
5
  from comtypes.tools.tlbparser import (
6
6
  BSTR_type,
7
7
  HRESULT_type,
8
- VARIANT_type,
9
8
  VARIANT_BOOL_type,
9
+ VARIANT_type,
10
10
  void_type,
11
11
  )
12
12
 
13
-
14
13
  iunknown_type = typedesc.ComInterface(
15
14
  "IUnknown", None, "{00000000-0000-0000-C000-000000000046}", ["hidden"], None
16
15
  )
@@ -1,15 +1,15 @@
1
- import os
1
+ import ctypes
2
+ import sys
2
3
  import unittest
3
- from ctypes import POINTER, byref
4
+
4
5
  from comtypes import GUID, COMError
5
- from comtypes.automation import DISPATCH_METHOD
6
6
  from comtypes.typeinfo import (
7
- LoadTypeLibEx,
7
+ TKIND_DISPATCH,
8
+ TKIND_INTERFACE,
9
+ GetModuleFileName,
8
10
  LoadRegTypeLib,
11
+ LoadTypeLibEx,
9
12
  QueryPathOfRegTypeLib,
10
- TKIND_INTERFACE,
11
- TKIND_DISPATCH,
12
- TKIND_ENUM,
13
13
  )
14
14
 
15
15
 
@@ -94,5 +94,17 @@ class Test(unittest.TestCase):
94
94
  self.assertEqual(guid, ti.GetTypeAttr().guid)
95
95
 
96
96
 
97
+ class Test_GetModuleFileName(unittest.TestCase):
98
+ def test_null_handler(self):
99
+ self.assertEqual(GetModuleFileName(None, 260), sys.executable)
100
+
101
+ def test_loaded_module_handle(self):
102
+ import _ctypes
103
+
104
+ dll_path = _ctypes.__file__
105
+ hmodule = ctypes.WinDLL(dll_path)._handle
106
+ self.assertEqual(GetModuleFileName(hmodule, 260), dll_path)
107
+
108
+
97
109
  if __name__ == "__main__":
98
110
  unittest.main()
@@ -1,7 +1,10 @@
1
- import unittest, os
1
+ import os
2
+ import unittest
2
3
  from copy import copy
3
4
  from ctypes import *
4
- from comtypes.client import GetModule, CreateObject
5
+
6
+ from comtypes.client import CreateObject, GetModule
7
+ from comtypes.GUID import _CoTaskMemFree
5
8
  from comtypes.patcher import Patch
6
9
 
7
10
  # ./urlhist.tlb was downloaded somewhere from the internet (?)
@@ -23,8 +26,8 @@ class _(object):
23
26
  for n, _ in self._fields_:
24
27
  setattr(result, n, getattr(self, n))
25
28
  url, title = self.pwcsUrl, self.pwcsTitle
26
- windll.ole32.CoTaskMemFree(cast_field(self, "pwcsUrl", c_void_p))
27
- windll.ole32.CoTaskMemFree(cast_field(self, "pwcsTitle", c_void_p))
29
+ _CoTaskMemFree(cast_field(self, "pwcsUrl", c_void_p))
30
+ _CoTaskMemFree(cast_field(self, "pwcsTitle", c_void_p))
28
31
  return result
29
32
 
30
33
 
@@ -293,9 +293,10 @@ def run_test(rep, msg, func=None, previous={}, results={}):
293
293
 
294
294
 
295
295
  def check_perf(rep=20000):
296
- from ctypes import c_int, byref
297
- from comtypes.automation import VARIANT
296
+ from ctypes import byref, c_int
297
+
298
298
  import comtypes.automation
299
+ from comtypes.automation import VARIANT
299
300
 
300
301
  print(comtypes.automation)
301
302
  variable = c_int()
@@ -1,8 +1,8 @@
1
1
  import time
2
2
  import unittest
3
3
 
4
- from comtypes import COMError
5
4
  import comtypes.client
5
+ from comtypes import COMError
6
6
 
7
7
  try:
8
8
  comtypes.client.GetModule(