Skip to content

Commit c690cf2

Browse files
committed
Improve importing _ctypes.
1 parent 2ef4476 commit c690cf2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

comtypes/server/register.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
python mycomobj.py /nodebug
3737
"""
3838

39+
import _ctypes
3940
import ctypes
4041
import logging
4142
import os
@@ -225,8 +226,6 @@ def _get_serverdll() -> str:
225226
handle = getattr(sys, "frozendllhandle", None)
226227
if handle is not None:
227228
return GetModuleFileName(handle, 260)
228-
import _ctypes
229-
230229
return _ctypes.__file__
231230

232231

0 commit comments

Comments
 (0)