python subprocess read stdout as it executes,sys.stdout.flush()