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

STINNER Victor report at bugs.python.org
Fri Jul 15 00:45:56 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> I don't really know what is still required

_cursesmodule.311.get_wch.patch doesn't apply correctly on Python 3.3 and use PyInt_FromLong() function, function removed from Python 3.0. Indeed, Iñigo wrote that the patch was not tested.

> what is the hold up?

Nobody wanted to take the responsability of the choice for get_wch(): add a new method or patch getch() ;-)

--

I commited Iñigo's patch to add window.get_wch() method with minor changes:

 - add :versionadded: 3.3 in the doc
 - document the new method What's new in Python 3.3 document
 - fix an error message: getch => get_wch
 - change error message (if ch==ERROR): "get_wch failed" => "no input" (message copied from the getch function)

--

I think that the Unicode support of curses in Python 3 is just completly broken: I opened a new issue for that, issue #12567.

I also create the issue #12568 to add a function to get the width of a character.

----------

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


More information about the Python-bugs-list mailing list