This project is very helpful in enabling my python program to read input from a barcode reader whilst running as a cron job on reboot. I would like to timeout the read_loop, after say 5 seconds, rather than wait forever for input which might never come. Is this do-able?
Activity
sezanzeb commentedon Nov 18, 2023
I haven't tried it, but you might have luck with something like
which should raise an exception after the timeout, or
which should be None after the timeout