I've tried using the the solution posted here:
How would I stop a while loop after n amount of time?
but that loop doesn't end with the function im running that accepts inputs. How do I force function5 to exit?
while True:
test = 0
if test == 5 or time.time() > timeout:
print "time's out!"
break
test = test - 1
function5()
def function5():
receiver = raw_input("enter something: ")