Re: print(....,file=sys.stderr) buffered?

2012-08-14 Thread Alain Ketterlin
Helmut Jarausch writes: > On Mon, 13 Aug 2012 15:43:31 +, Grant Edwards wrote: > >> On 2012-08-13, Helmut Jarausch wrote: >>> Hi, >>> >>> for tracing purposes I have added some print outs like >>> >>> print('+++ before calling foo',file=sys.stderr) >>> x=foo(..) >>> print('--- after calling

Re: print(....,file=sys.stderr) buffered?

2012-08-13 Thread Jerry Hill
On Mon, Aug 13, 2012 at 11:16 AM, Helmut Jarausch wrote: > Now, when executing this, I always get > > +++ before calling foo > --- after calling foo entering foo ... Can you give us a piece of code we can run that produces this output for you? You gave us an outline in your original post,

Re: print(....,file=sys.stderr) buffered?

2012-08-13 Thread Helmut Jarausch
On Mon, 13 Aug 2012 15:43:31 +, Grant Edwards wrote: > On 2012-08-13, Helmut Jarausch 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', Sorry, this is a cut'n paste

Re: print(....,file=sys.stderr) buffered?

2012-08-13 Thread Grant Edwards
On 2012-08-13, Helmut Jarausch 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

Re: print(....,file=sys.stderr) buffered?

2012-08-13 Thread Ramchandra Apte
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

print(....,file=sys.stderr) buffered?

2012-08-13 Thread Helmut Jarausch
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 f