gbishop / cython-hidapi

Python wrapper for the hidapi (not active, use one of the forks)
Other
50 stars 56 forks source link

read() should accept a timeout #13

Open Arachnid opened 10 years ago

Arachnid commented 10 years ago

Currently, if you call read() when there is nothing to read, the process will lock up indefinitely in C code, so even a KeyboardInterrupt will not break out of it.

slobodan-ilic commented 10 years ago

Hi Arachnid, Try setting the "nonblocking" to 1, before reading. Slobodan