After digging around in SO for a while, I still haven\'t found a good answer to what I would hope is a fairly common need. Basically I need a main thread to do \"stuff\" unt
I found the accepted answer didn't work for me - it would still block at raw_input even in a separate thread. However, when I switched the threads around it worked right away.
import threading
def mainWork():
while 1:
#whatever you wanted to do until an input is received
myThread = threading.Thread(target=mainWork)
myThread.start()
while 1:
input = raw_input()
#do stuff with input when it is received