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

Barry Scott barry at barrys-emacs.org
Wed Jan 4 10:36:07 EST 2023


On 04/01/2023 06:46, Chris Angelico wrote:
> I've known some systems to have a trigger of "reading on FD 0 flushes
> FD 1"

C++ has this feature:

Quote from https://en.cppreference.com/w/cpp/io/cin

"Once |std::cin| is constructed, std::cin.tie() returns &std::cout 
<http://en.cppreference.com/w/cpp/io/cout>, and likewise, 
std::wcin.tie() returns &std::wcout 
<http://en.cppreference.com/w/cpp/io/cout>. This means that any 
formatted input operation on |std::cin| forces a call to std::cout 
<http://en.cppreference.com/w/cpp/io/cout>.flush() if any characters are 
pending for output."

Barry



More information about the Python-list mailing list