FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-152332: Add the curses.term_attrs() function by serhiy-storchaka · Pull Request #152333 · python/cpython · GitHub

Repository navigation

gh-152332: Add the curses.term_attrs() function - #152333

Merged
serhiy-storchaka merged 4 commits into
python:mainfrom
serhiy-storchaka:curses-term-attrs
Jun 27, 2026
Merged

serhiy-storchaka merged 4 commits into
python:mainfrom
serhiy-storchaka:curses-term-attrs

Conversation

Copy link
Copy Markdown
Member

Add the X/Open term_attrs() function, the attr_t counterpart of the already-exposed termattrs().

term_attrs() returns the logical OR of all video attributes supported by the terminal as :ref:WA_* <curses-wa-constants> values, where termattrs() returns the equivalent A_* values as a chtype.

It is implemented with PyLong_FromUnsignedLong() rather than the int-returning helper used by termattrs(), because attr_t is unsigned (and 64-bit on an lp64 ncurses build).

term_attrs() returns the video attributes supported by the terminal as
WA_* values, the counterpart of termattrs() for the A_* values.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

read-the-docs-community Bot commented Jun 26, 2026 •
edited
Loading

Copy link
Copy Markdown

serhiy-storchaka merged commit 0ed6711 into python:main Jun 27, 2026
54 checks passed
serhiy-storchaka deleted the curses-term-attrs branch June 27, 2026 20:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL