I am doing something like this in python
class MyThread ( threading.Thread ):
def run (s):
try:
s.wantQuit = 0
while(not s.wantQuit):
button = raw_input()
if button == "q":
s.wantQuit=1
except KeyboardInterrupt:
s.wantQuit = 1
myThread = MyThread ()
myThread.start()
a=5
while not myThread.wantQuit:
print "hey"
if (a == 0):
break;
a = a-1;
time.sleep(1)
#"""
sys.exit()
What happens is my app locks up for 5 seconds printing "hey" (5 times) THEN i get the raw_input dialog. How can i have the dialog show up so i can quit anytime instead of when my loop runs out?