I'm making software in python running on raspberry, now it has a data entry on a matrix keyboard ( link ) and another by a bar code reader, which functions like a normal keyboard.
I loop through the menu first by listening to the matrix keyboard inputs, 1 for input in it and 2 for input by bar code .. what I need is the following, when I enter the type 2 that is the barcode reader, I use python input (), however I need a timeout for break this input if the user does not pass anything on the reader.
How do I get the timeout to exit an input in python?