Skip to content

Add curses.term_attrs() #152332

Closed
Closed

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

Activity

  1. added a commit that references this issue on Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions