Feature or enhancement
The :mod:curses module exposes :func:curses.termattrs, which returns the logical OR of all video attributes supported by the terminal as a chtype (the A_* attributes), but not its X/Open counterpart term_attrs().
term_attrs() returns the same information as an attr_t value, that is, in terms of the WA_* extended attributes (added in gh-152219).
Proposed API:
curses.term_attrs() -> int
The result pairs with the WA_* constants, for example curses.term_attrs() & curses.WA_BOLD.
Linked PRs
Feature or enhancement
The :mod:
cursesmodule exposes :func:curses.termattrs, which returns the logical OR of all video attributes supported by the terminal as achtype(theA_*attributes), but not its X/Open counterpartterm_attrs().term_attrs()returns the same information as anattr_tvalue, that is, in terms of theWA_*extended attributes (added in gh-152219).Proposed API:
curses.term_attrs()->intThe result pairs with the
WA_*constants, for examplecurses.term_attrs() & curses.WA_BOLD.Linked PRs