ethanhs / pyhooked

Pure Python hotkey hook, with thanks to pyHook and pyhk
155 stars 28 forks source link

I get an 'ctypes' error #26

Closed shankara403 closed 7 years ago

shankara403 commented 7 years ago

Hi, Install pyhooked from the master branch using pip.

However, I run the example python script using python example.py it gives me the following error:

  File "keylogerr.py", line 1, in <module>
    from pyhooked import Hook, KeyboardEvent, MouseEvent
  File "/usr/local/lib/python2.7/dist-packages/pyhooked/__init__.py", line 7, in <module>
    from ctypes import wintypes
  File "/usr/lib/python2.7/ctypes/wintypes.py", line 23, in <module>
    class VARIANT_BOOL(_SimpleCData):
ValueError: _type_ 'v' not supported
simon2x commented 7 years ago

are you using Windows?

discussed in this link:

http://stackoverflow.com/questions/32608232/valueerror-type-v-not-supported-error-after-installing-pyreadline

Specifically this comment:

"" It is trying to import windows specific data types from ctypes which is obviously not possible since you are not running Windows. ""

shankara403 commented 7 years ago

Ahh! That is interesting. The thing is. I was stupid enough to think i was in windows when I was actually using Bash as a Linux subsystem in the new Windows 10 developers editions! 👍

ethanhs commented 7 years ago

@saikrishnadeep glad you figured out the issue, please keep in mind that pyhooked is in maintenance mode. If you aren't using it for a current project, it is strongly recommended to not start using it at this point. Please see #25 for more.