QUERY · ISSUE
USB_VCP.readline() does not read whole line
port-stm32
On a pyboard, I am having some trouble with USB_VCP.readline(); it seems to return whatever is in the buffer, even if it's not a full line. I would have expected the function to return None until a newline character is received, as if I were reading from a file. Is this expected? I noticed that the documentation text for USB_VCP's implementation of readline() is different than the text for UART and socket; I'm hoping this isn't a sign that they are supposed to work differently.
CANDIDATE · ISSUE
stmhal: sys.stdin and pyb.USB_VCP() don't have readinto
sys.stdin seems to be missing readinto
>>> dir(sys.stdin)
['read', 'readall', 'readline', 'write', 'close', '__del__', '__enter__', '__exit__']
pyb.USB_VCP() also seems to be missing readinto
>>> dir(pyb.USB_VCP())
['setinterrupt', 'isconnected', 'any', 'send', 'recv', 'read', 'readall', 'readline', 'write', 'close', '__del__', '__enter__', '__exit__']
I'll use read in the meantime.