[issue10570] curses.tigetstr() returns bytes, but curses.tparm() expects a string

STINNER Victor report at bugs.python.org
Wed Nov 2 23:48:09 CET 2011

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

"I don't believe that the first parameter to tparm() (the format string) is ever constructed by hand, because it's terminal specific. The value is obtained from the terminfo database by calling tigetstr() instead. Furthermore, tigetstr() returns binary data, for which bytes is the only sane representation, and therefore tparm() should expect bytes instead of str."

Ok, it sounds to be fair. I wrote a patch based on yours (except that Python crashes with your patch :-)).

resolution:  -> fixed
status: open -> closed

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list