[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

Iñigo Serna report at bugs.python.org
Wed Aug 26 17:47:55 CEST 2009


Iñigo Serna <inigoserna at gmail.com> added the comment:

Q. Why not change getch() to always use get_wch()?

This could break backwards compatibility.
There are some code out there that may use getch() to get the bytes
stream one by one and build the wide char.
In fact I'm using this trick to get unicode chars by now.
Look the thread link in first comment to find the implementation I've
developed for my app. Other people are using similar approaches too.


Q. I think you also want fix getkey() / introduce get_wkey().

In my own experience get_wkey isn't be as useful when dealing with wide
chars. But, of course, that's only my use cases.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6755>
_______________________________________


More information about the Python-bugs-list mailing list