I would like to be able to time out a script in python 3 after 10 seconds or so if there hasn't been any input from the keyboard. I've researched using the signal, time, and thread modules and they are all getting complicated to me. Preferably, I would just like to use the time module being that I'm already using it and vaguely familiar with it.
Ideally, I would like it to run as follows:
>>>you have 10 seconds to type something in..
Sorry, too slow.
>>>you have 10 seconds to type something in..
HEY!! #user's input
you entered: 'HEY!!'