Petri Lehtinen <pe...@digip.org> added the comment:

I'm not a curses expert, but after digging a while, I believe that I now 
understand what these functions are doing. tigetstr() returns a "format string" 
(bytes) and tparm() does substitutions and returns a command string (bytes) for 
the terminal.

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.

Attached a patch that fixes this.

----------
keywords: +needs review, patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file23595/issue10570.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10570>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to