QUERY · ISSUE
Binary stdin and stdout buffers for Unix port
enhancement
$ micropython
>>> import sys
>>> sys.stdout.buffer
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'TextIOWrapper' object has no attribute 'buffer'
>>>
Well, other ports have it … CPython has it … and I'd really like to not have to fall back to open("/dev/stdout","wb") in my unit tests.
Same for stdin of course.
CANDIDATE · PULL REQUEST
tools/mpremote: Console compatible without raw attribute.
tools
When running mpremote in the vscode terminal on OSX the sys.stdout.buffer did not have the raw attribute - it appeared to work fine without it however.