Skip to content

Add curses.term_attrs() #152332

Description

@serhiy-storchaka

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions