jepler at unpythonic.net
Mon Mar 21 00:04:28 CET 2005
In the first case, there is either no buffering, or line buffering on
sys.stdout, so you see the lines in order.
In the second case, there is a buffer of a few hundred or thousand bytes
for stdout in the python process, and you see the two lines of python
output together (in this case, when the python process exits and flushes
all its buffers).
You can use the "flush" method on file objects to "clear out" these
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the Python-list