Is there a way to give the user a raw_input, but give a null response ("") if nothing is typed within x amount of time? I’d like to give the user 10 seconds to enter options when the script starts, but if time expires (or they press enter), simply continue the script. If you know AppleScript, I’d like display dialog "Enter options" giving up after 10 in python
Is there a way to give the user a raw_input, but give a null
Share
If you are in unix-land, you can use python’s signal library and use an alarm. Otherwise, I think
raw_inputis totally thread-blocking.See this answer for implementation help.