THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/08/2012 at 13:20, xxxxxxxx wrote:
I need to output a number for a loading bar within one of my plugins.
But the issue is that python wont print until the end of a function.
import sys import time def main() : print "one" sys.stdout.flush() time.sleep(5) print "two" if __name__=='__main__': main()
waits 5 seconds and then prints "one" and "two" at the same time.
how can a make them output realtime.
I tried adding
which would be the solution if this wasnt python within c4d.