gan*_*bra 5 python linux ctypes
当我尝试导入ctypes.wintypes时收到此错误,我该如何解决此问题?
In [2]: import ctypes.wintypes
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-2-8395760a4e8a> in <module>()
----> 1 import ctypes.wintypes
/usr/lib/python2.7/ctypes/wintypes.py in <module>()
21
22 from ctypes import _SimpleCData
---> 23 class VARIANT_BOOL(_SimpleCData):
24 _type_ = "v"
25 def __repr__(self):
ValueError: _type_ 'v' not supported
Run Code Online (Sandbox Code Playgroud)
您ctypes.wintypes只能在Windows中导入.(ctypes.wintypes包含特定于Windows的数据类型.)
视窗:
>>> import ctypes.wintypes
>>>
Run Code Online (Sandbox Code Playgroud)
Linux的:
>>> import ctypes.wintypes
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/ctypes/wintypes.py", line 23, in <module>
class VARIANT_BOOL(_SimpleCData):
ValueError: _type_ 'v' not supported
>>>
Run Code Online (Sandbox Code Playgroud)