1from threading import Thread
2from time import sleep
3
4result = None
5
6def update_every_second():
7 while result is None:
8 sleep(1)
9 print "update"
10
11t = Thread(target=update_every_second)
12t.start()
13result = raw_input('? ')
14
15print "The user typed", result
16