chiark / gitweb /
Switch to using Unicode input.
authorSimon Tatham <anakin@pobox.com>
Thu, 7 Dec 2023 17:56:23 +0000 (17:56 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 7 Dec 2023 17:56:23 +0000 (17:56 +0000)
commitbf645b0b89428dca7dee1e7296afe7e5d1d24c96
tree16eb68181295644c15866997e35a923b772b00c7
parent4b781577d4fa2add85c00d8e6cf60c673c597ebe
Switch to using Unicode input.

I failed to notice that getch() delivers you single bytes in trad
fashion. Switched to get_wch(), which returns either a Python char
(that is, a length-1 str) or an integer containing a curses key code.

Also it throws an exception instead of returning curses.ERR, which
I've dealt with by the simplest possible method of turning it back
into curses.ERR. (The exception in this case is almost always 'stdin
is nonblocking and there's nothing to see here yet'.)
cursesclient.py
util.py