print()

Chris Rebert clp2 at rebertia.com
Fri Oct 16 17:19:13 EDT 2009


On Fri, Oct 16, 2009 at 2:04 PM, mattia <gervaz at gmail.com> wrote:
> Is there a way to print to an unbuffered output (like stdout)?

Just follow your prints or stdout.write()s with calls to
stdout.flush() to flush the buffer.

You could alternatively use the -u option to the python interpreter to
make the standard streams operate unbuffered.

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list