← index #11099PR #8238
Off-topic · high · value 1.429
QUERY · ISSUE

Binary stdin and stdout buffers for Unix port

openby smurfixopened 2023-03-22updated 2023-03-30
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.

closedby andrewleechopened 2022-02-01updated 2022-02-04
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.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied