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)

The only one solution I have found is to call "echo -n 'my_string'".
But it is not nice. Because I have to escape all special chars in the string
manually.

Any advice?
Best regards
-- Qian Xu
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to