I came across this thread when I was looking for a solution, but it doesn't quite do what I need it to:
What is the best way to repeatedly execute a function every x seconds in Python?
This actually "works" (or at least the first solution does) but it doesn't allow you to do it simultaneously along with the rest of the script.
Basically, I need to execute a function like this:
def functionName():
print "text"
I need this to execute every, say, 100 milliseconds. But I need this while loop to be looping simultaneously:
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
How would I go about this?
Thanks!