Python - do something until keypress or timeout Python - do something until keypress or timeout multithreading multithreading