Editing Python
Revision as of 18:48, 7 April 2024 by Mark (talk | contribs) (Created page with "=== Check for input #1 === <code> import sys, select print "You have ten seconds to answer!" i, o, e = select.select( [sys.stdin], [], [], 10 ) if (i): print "You said", sys.stdin.readline().strip() else: print "You said nothing!" </code> === Check for input #2 === <code> import signal TIMEOUT = 5 # number of seconds your want for timeout def interrupted(signum, frame): "called when read times out" print 'interrupted!' signal.signal(sig...")
Warning: You are editing an out-of-date revision of this page.
If you publish it, any changes made since this revision will be lost.
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
Retrieved from "http://www.softwareguy.org/Wiki/index.php/Python"