terminating input() function after specified time - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

terminating input() function after specified time

ediz84ediz84 Posts: 1Member
Hi there,

I need to get user input (via keyboard) but if the user does not respond within a certain time interval (i.e. 3sec), the program needs to abort the user input function and move on to the next stage of the program.

I have been trying to use the 'input()' function but there doesn't seem a way to exit from the function if no user input has been supplied. I have tried using the timer object but still run into the same problem.

Any ideas? Its probably very simple but the solution is not presenting itself to me!

Thanks,

Ed
Sign In or Register to comment.