Unfortunately, on Windows, select.select only works on sockets, not ordinary files and the console. So, if you want to work on Windows, you need a different approach. On Windows only, the Python standard library is a small module called msvcrt, including functions such as msvcrt.kbhit that tells you that any keystroke is waiting to be read. Here you can sys.stdout.write a request, then enter a small loop (including time.sleep (0.2) or so) that waits to find out if the user has pressed the key - if so, you can sys.stdin.readline and etc., but if after your desired timeout does not work was hit, then just return an empty string from your function.
, -, ( - !). , , ( , sys.stdin, . msvcrt.getch, ). , , - , , , , .