0

I want to set up the end of my python script to ask for an input for 5 seconds, and then print if nothing is set.

I have tried looking into the pygame library and a variety of other modules, but nothing seems to work or be 3.x compatible.

thank = ""
thank = input()

time.sleep(5)

if thank == "":
    print("What, you aren't even going to say 'thank you'? So rude.")
else:
    print("You are welcome")
  • 1
    Possible duplicate of [Python nonblocking console input](https://stackoverflow.com/questions/2408560/python-nonblocking-console-input) – Tomerikoo Jul 28 '19 at 23:11
  • 1
    Possible duplicate of [Python 3 Timed Input](https://stackoverflow.com/questions/15528939/python-3-timed-input). Also more info on this [post](https://stackoverflow.com/questions/1335507/keyboard-input-with-timeout-in-python) – Akaisteph7 Jul 28 '19 at 23:40

0 Answers0