Exploring terminfo

Alan Gauld alan.gauld at yahoo.co.uk
Mon Jan 18 20:34:35 EST 2021


On 18/01/2021 22:14, Random832 wrote:
> On Fri, Jan 15, 2021, at 13:36, Alan Gauld via Python-list wrote:
>> That could make a big difference, the putp() function specifically
>> states that it writes to stdout.
> 
> I think there is a reasonable argument that this is a deficiency of the curses module.
> 
> I think that the curses module should ..> B) expose a version of putp that uses pthon's stdout[.buffer].write
rather than C's putchar.

To be fair that's a limitation of the C curses library. putp() is a
wrapper around tputs() even there, and you can't change what it does.
The gap in the curses module is that it doesn't offer the tputs()
option as an alternative.

But there are quite a lot of gaps in the curses module it's just
that most folks don't use them so nobody complains or takes action
to add them.

I've been using curses (C and python) for nearly 30 years and
this is the first time I've ever used the tiXXX functions,  and it
was mainly just out of curiosity rather than real need.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Python-list mailing list