use new python 3.3 flush=True argument