Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 45 additions & 9 deletions 54 Doc/library/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1234,27 +1234,63 @@ The :mod:`curses` module defines the following data members:
A string representing the current version of the module. Also available as
:const:`__version__`.

Several constants are available to specify character cell attributes:
Some constants are available to specify character cell attributes.
The exact constants available are system dependent.

+------------------+-------------------------------+
| Attribute | Meaning |
+==================+===============================+
| ``A_ALTCHARSET`` | Alternate character set mode. |
| ``A_ALTCHARSET`` | Alternate character set mode |
+------------------+-------------------------------+
| ``A_BLINK`` | Blink mode. |
| ``A_BLINK`` | Blink mode |
+------------------+-------------------------------+
| ``A_BOLD`` | Bold mode. |
| ``A_BOLD`` | Bold mode |
+------------------+-------------------------------+
| ``A_DIM`` | Dim mode. |
| ``A_DIM`` | Dim mode |
+------------------+-------------------------------+
| ``A_NORMAL`` | Normal attribute. |
| ``A_INVIS`` | Invisible or blank mode |
+------------------+-------------------------------+
| ``A_NORMAL`` | Normal attribute |
+------------------+-------------------------------+
| ``A_PROTECT`` | Protected mode |
+------------------+-------------------------------+
| ``A_REVERSE`` | Reverse background and |
| | foreground colors. |
| | foreground colors |
+------------------+-------------------------------+
| ``A_STANDOUT`` | Standout mode |
+------------------+-------------------------------+
| ``A_UNDERLINE`` | Underline mode |
+------------------+-------------------------------+
| ``A_HORIZONTAL`` | Horizontal highlight |
+------------------+-------------------------------+
| ``A_LEFT`` | Left highlight |
+------------------+-------------------------------+
| ``A_LOW`` | Low highlight |
+------------------+-------------------------------+
| ``A_RIGHT`` | Right highlight |
+------------------+-------------------------------+
| ``A_TOP`` | Top highlight |
+------------------+-------------------------------+
| ``A_VERTICAL`` | Vertical highlight |
+------------------+-------------------------------+
| ``A_CHARTEXT`` | Bit-mask to extract a |
| | character |
+------------------+-------------------------------+

Several constants are available to extract corresponding attributes returned
by some methods.

+------------------+-------------------------------+
| Bit-mask | Meaning |
+==================+===============================+
| ``A_ATTRIBUTES`` | Bit-mask to extract |
| | attributes |
+------------------+-------------------------------+
| ``A_STANDOUT`` | Standout mode. |
| ``A_CHARTEXT`` | Bit-mask to extract a |
| | character |
+------------------+-------------------------------+
| ``A_UNDERLINE`` | Underline mode. |
| ``A_COLOR`` | Bit-mask to extract |
| | color-pair field information |
+------------------+-------------------------------+

Keys are referred to by integer constants with names starting with ``KEY_``.
Expand Down
2 changes: 2 additions & 0 deletions 2 Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ Library
Documentation
-------------

- bpo-30176: Add missing attribute related constants in curses documentation.

- bpo-28929: Link the documentation to its source file on GitHub.

- Issue #26355: Add canonical header link on each page to corresponding major
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.