python - raw_input with limited time? -


is there way give user raw_input, give null response ("") if nothing typed within x amount of time? i'd give user 10 seconds enter options when script starts, if time expires (or press enter), continue script. if know applescript, i'd display dialog "enter options" giving after 10 in python

if in unix-land, can use python's signal library , use alarm. otherwise, think raw_input totally thread-blocking.

see this answer implementation help.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -