Re: Temporally disabling buffering

2022-03-31 Thread Barry
> On 31 Mar 2022, at 17:39, Cecil Westerhof via Python-list > wrote: > > In Python when the output of a script is going to a pipe stdout is > buffered. When sending output to tee that is very inconvenient. > > We can set PYTHONUNBUFFERED, but then stdout is always unbuffered. > > On Linux

Re: Temporally disabling buffering

2022-03-31 Thread Marco Sulla
Dirty suggestion: stderr? On Thu, 31 Mar 2022 at 18:38, Cecil Westerhof via Python-list wrote: > > In Python when the output of a script is going to a pipe stdout is > buffered. When sending output to tee that is very inconvenient. > > We can set PYTHONUNBUFFERED, but then stdout is always

Temporally disabling buffering

2022-03-31 Thread Cecil Westerhof via Python-list
In Python when the output of a script is going to a pipe stdout is buffered. When sending output to tee that is very inconvenient. We can set PYTHONUNBUFFERED, but then stdout is always unbuffered. On Linux we can do: PYTHONUNBUFFERED=T script.py | tee script.log Now the output is only