[issue41449] An article on Python 3 stdout and stderr output buffering

Guido van Rossum report at bugs.python.org
Mon Aug 3 14:04:39 EDT 2020


Guido van Rossum <guido at python.org> added the comment:

If you don't even know whether it's Python, Docker or Kubernetes you really need to ask somewhere else.  Plenty of user groups around.

Python detects tty using the standard UNIX isatty() function.

To a tty we always get line buffering.

To a file we use a larger buffer.

For more details see the source at
https://github.com/python/cpython/blob/4660597b51b3d14ce6269d0ed865ab7e22c6ae1f/Python/pylifecycle.c#L1942

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41449>
_______________________________________


More information about the Python-bugs-list mailing list