On 1/3/23, c.bu...@posteo.jp <c.bu...@posteo.jp> wrote: > > If the user request the usage info via "-h" it goes to stdout.
The standard file for application output is sys.stdout. Note that sys.stdout may be buffered, particularly if it isn't a tty. When a file is buffered, writes are aggregated and only written to the OS file when the buffer fills up or is manually flushed. > Why does logging behave different? DEBUG and INFO imho should go to > stdout not stderr. The standard file for error messages and other diagnostic information is sys.stderr. This file should never be buffered. -- https://mail.python.org/mailman/listinfo/python-list