magmax / python-readchar

Python library to read characters and key strokes
MIT License
143 stars 43 forks source link

can/should we switch from `msvcrt.getch()` to `msvcrt.getwch()` #93

Closed Cube707 closed 3 weeks ago

Cube707 commented 1 year ago

getwch() directly returns a string, so we could remove the manual decoding done here:

https://github.com/magmax/python-readchar/blob/9991a0b8d299b870f21e0b062fa52961cf329f0e/readchar/_win_read.py#L10-L11

Does a swicht pose problems? Can we overcome theme? Are there donwsides?

Cube707 commented 1 year ago

Problem 1: using the corisponding ungetwch() in the tests raises a bounch of OSError's