Terry Reedy wrote:
The issue Armin ran into is this. He write a library module that makes
sure the streams are binary.
Seems to me he made a mistake right there. A library should
*not* be making global changes like that. It can obtain
binary streams from stdin and stdout for its own use, but
it shouldn't stuff them back into sys.stdin and sys.stdout.
If he had trouble because another library did that, then
that library is broken, not Python.