What should go to stdout/stderr and why Python logging write everything to stderr?

Eryk Sun eryksun at gmail.com
Wed Jan 4 01:26:06 EST 2023


On 1/3/23, Chris Angelico <rosuav at gmail.com> wrote:
>
> FDs can also be buffered. If it's buffering you want to avoid, don't
> mess around with exactly which one you're writing to, just flush.

I meant to flush a C FILE stream or Python file before writing
directly to the file descriptor, in order to avoid out-of-sequence and
interlaced writes that make no sense. Any OS buffering on the file
doesn't matter in this regard.


More information about the Python-list mailing list