plesty.bench.streams
How plesty-bench and plesty-server write to their standard streams.
Here, in the client package, because both programs need it and plesty-server depends on plesty-bench, never the other way round.
Functions
|
Never let the console's codepage turn output into a crash, or into other characters. |
Module Contents
- plesty.bench.streams.printable_output() None
Never let the console’s codepage turn output into a crash, or into other characters.
A job log holds whatever the tools wrote — uv draws its resolution errors with box characters — and a Windows console is cp1252 by default, which cannot encode them. Echoing such a log raised UnicodeEncodeError and the operator got a traceback instead of the one-line error the log actually contained.
A console keeps its own encoding and loses what it cannot draw: a
?is a fair price for the message surviving. Anything redirected is a file or a pipe — a job log, a script reading the client — so it is written as UTF-8 and keeps every character. Without this,plesty-benchpiped on Windows wrote the ANSI codepage: the…of a reply became a single0x85byte, and whatever read the pipe showedà.- Return type:
None