Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in importing ctypes.wintypes

When I tried to import ctypes.wintypes am getting this error, how can I fix this?

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
like image 684
ganeshredcobra Avatar asked Jan 03 '14 06:01

ganeshredcobra


1 Answers

You can import ctypes.wintypes only in Windows. (ctypes.wintypes contains windows specific data types.)

Windows:

>>> import ctypes.wintypes
>>>

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
>>>
like image 139
falsetru Avatar answered Sep 28 '22 04:09

falsetru