strange exception in keyboard library << python -
i want wait until button 'q' pressed
this code:
import keyboard while true: if keyboard.is_pressed('q'): print('q pressed') break #finishing loop
and exception got:
exception in thread thread-1: traceback (most recent call last): file "c:\python27\lib\threading.py", line 810, in __bootstrap_inner self.run() file "c:\python27\lib\threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) file "c:\python27\lib\site-packages\keyboard\__init__.py", line 134, in listen _os_keyboard.listen(self.queue, _key_table.is_allowed) file "c:\python27\lib\site-packages\keyboard\_winkeyboard.py", line 423, in listen keyboard_hook = setwindowshookex(wh_keyboard_ll, keyboard_callback, null, null) argumenterror: argument 2: <type 'exceptions.typeerror'>: expected cfunctiontype instance instead of cfunctiontype
what problem?
Comments
Post a Comment