curses and use_default_colors()

Brian Victor bhv1 at psu.edu
Fri Aug 1 12:31:28 EDT 2003


A.M. Kuchling wrote:
> On Wed, 30 Jul 2003 17:34:29 GMT, 
> 	Brian Victor <bhv1 at psu.edu> wrote:
>>     {"use_default_colors",  pyuse_default_colors, METH_VARARGS,
> Use METH_NOARGS instead of METH_VARARGS; as written, this code will accept
[snip]

OK, I made this change on my local copy.

> I'll add this function to the curses module, so at least it'll be in 2.4;

Great, thanks!  Note that this is an ncurses extension, so it won't link
with plain old curses.  I don't know if that's really an issue nowadays or
not.  Also, if you're looking for things to be complete, adding
assume_default_colors would be a good idea.  But that might require
changing init_pair to allow -1 for foreground/packground parameters.

> thanks for writing it. Anyone know if it's possible to test it on MacOS X?
> Does the Terminal support transparency?

Interestingly, both Terminal and iTerm seem to make everything
transparent, so use_default_colors has no significant effect.  That is,
a black background is indistinguishable from a transparent/default
background.

-- 
Brian




More information about the Python-list mailing list