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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -