This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author petri.lehtinen
Recipients jwilk, klausman, nadeem.vawda, petri.lehtinen, vstinner
Date 2011-11-02.20:10:06
SpamBayes Score 2.6973621e-09
Marked as misclassified No
Message-id <1320264607.48.0.537644361265.issue10570@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-11-02 20:10:07petri.lehtinensetrecipients: + petri.lehtinen, vstinner, nadeem.vawda, jwilk, klausman
2011-11-02 20:10:07petri.lehtinensetmessageid: <1320264607.48.0.537644361265.issue10570@psf.upfronthosting.co.za>
2011-11-02 20:10:06petri.lehtinenlinkissue10570 messages
2011-11-02 20:10:06petri.lehtinencreate