As far as I know, stdout is usually buffered (not necessary) in both C++ and Python stderr is non-buffered in both C++ and Python (I can't imagine the point of stderr if it were buffered) Even with this, stdout usually come immediately - the situation you have shouldn't happen. Are you using an IDE? If so, which one?
On 13 August 2012 20:46, Helmut Jarausch <jarau...@skynet.be> wrote: > Hi, > > for tracing purposes I have added some print outs like > > print('+++ before calling foo',file=sys.stderr) > x=foo(..) > print('--- after calling foo', > > and within 'foo' > print('>>> entering foo ...',file=sys.stderr) > > Now, when executing this, I always get > > +++ before calling foo > --- after calling foo > >>> entering foo ... > > When outputting to stderr from C/C++ it's guaranteed that the different > outputs appear in the same order as they have been generated. > > Is this guarantee no more valid in Python 3.2 ? > > Many thanks for a comment, > Helmut. > > (That's a single-threaded application) > > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list