print a progress-bar processing in Python,sys.stdout.flush()