[baremetal] sys.stdin does not handle ctrl-D EOF markers
sys.stdin.read(), sys.stdin.readlines(), etc. do not handle ctrl-D at the beginning of a line as EOF (except on ports like unix). So for instance, there's no way to terminate input when doing sys.stdin.readlines().
Is this something that should mimic CPython on an OS-less port? Some lower-level stream read routine could check if the stream was sys.stdin and handle ctrl-D specially.
(tested on esp8266 port)
esp8266: can't read from sys.stdin
I was trying to work around the fact that the ESP8266 port doesn't have UART support on the Python side yet, and simply read/write from and to the sys.stdin and sys.stdout.
While sys.stdout works as expected, trying to read even a single character from sys.stdin hangs the REPL. I compared with other ports, and that's not the case in them -- they wait until the specified number of characters is input and then properly return those characters.