Ok, so I am making a small program for fun, and I would like to create an update button that allows the user to control how data is regularly collected and displayed. I decided to use time.sleep (x) x, which was raw_input. But it does not seem to work as it should. It pauses the full script, and then does everything.
eg:
import time
print "This now"
time.sleep(x)
print "and this after x amount of seconds"
So print the first part, then the second after x seconds.
But instead, it prints all this right after x seconds.
When I use the if statement after it seems to wait for the extra seconds to print in the if statement.
It really messes up my data when you bet something greater than 0, its old data worth x. For example, if I put 60, it will be the whole tiniest old information (not live). Leaving it at 0, it just spammed the console too much, although this makes reading impossible.
Any idea why and how to fix my problem?
source
share