1
I’m making a python software running on Raspberry, today it has a data input by a keyboard Matrix (https://www.adafruit.com/product/419) and another by a barcode reader, which works like a normal keyboard.
I’m in infinite loop on the menu first listening to the Matrix keyboard inputs, 1 for entry into it and 2 for entry by barcode.. what I need is this, when I enter type 2 which is the barcode reader, I use the python input() but I need a timeout to break this input if the user does not pass anything in the reader.
How to timeout out an input in python ?
Tovmeod, I tried using Signal.Alarm, but it didn’t interrupt the input, it just said that I had typed up the timeout after I hit enter to exit the input.. now select it, whenever I try to use it I get the error: io.Unsupportedoperation: fileno
– Richard Matheus
on my computer worked smoothly, Ubuntu with python 3.5. What you used?
– tovmeod
can! I had to run as an administrator inside Raspberry’s Lxterminal.. in IDLE 2 or IDLE 3 it didn’t work..
– Richard Matheus