Message146873
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. |
|
Date |
User |
Action |
Args |
2011-11-02 20:10:07 | petri.lehtinen | set | recipients:
+ petri.lehtinen, vstinner, nadeem.vawda, jwilk, klausman |
2011-11-02 20:10:07 | petri.lehtinen | set | messageid: <1320264607.48.0.537644361265.issue10570@psf.upfronthosting.co.za> |
2011-11-02 20:10:06 | petri.lehtinen | link | issue10570 messages |
2011-11-02 20:10:06 | petri.lehtinen | create | |
|