Qian Xu wrote:

> Hello All,
> 
> Is it possible to print something to console without a line break?
> 
> I tried:
>   sys.stdout.write("Testing something ...") // nothing will be printed
>   time.sleep(1)
>   sys.stdout.write("done\n") // now, the whole string will be printed
> 
> What I want, is to see "Testing something ..." first.
> And after 1 second, to see "done" (with a line break)
> 

I have solved the problem by calling
  sys.stdout.flush()

--Qian Xu


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to