Does one have to use curses to read single characters from keyboard?

Chris Angelico rosuav at gmail.com
Sun Dec 11 17:32:49 EST 2022


On Mon, 12 Dec 2022 at 09:24, Barry Scott <barry at barrys-emacs.org> wrote:
> You would need to have a loop that collected all the utf-8 bytes of a single code point.
> You can to look at the first byte of know if the utf-8 is 1, 2, 3 or 4 bytes for a code point.

And cope with escape sequences too - if you press an arrow key, for
instance, you'll get a multi-character string to signal that.

This is why it's probably easier to let someone else do the work.

ChrisA


More information about the Python-list mailing list