File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed
Misc/NEWS.d/next/Documentation Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -644,7 +644,8 @@ The module :mod:`curses` defines the following functions:
644
644
645
645
.. function :: update_lines_cols()
646
646
647
- Update :envvar: `LINES ` and :envvar: `COLS `. Useful for detecting manual screen resize.
647
+ Update the :const: `LINES ` and :const: `COLS ` module variables.
648
+ Useful for detecting manual screen resize.
648
649
649
650
.. versionadded :: 3.5
650
651
@@ -1345,10 +1346,27 @@ The :mod:`curses` module defines the following data members:
1345
1346
.. data :: COLORS
1346
1347
1347
1348
The maximum number of colors the terminal can support.
1349
+ It is defined only after the call to :func: `start_color `.
1348
1350
1349
1351
.. data :: COLOR_PAIRS
1350
1352
1351
1353
The maximum number of color pairs the terminal can support.
1354
+ It is defined only after the call to :func: `start_color `.
1355
+
1356
+ .. data :: COLS
1357
+
1358
+ The width of the screen, i.e., the number of columns.
1359
+ It is defined only after the call to :func: `initscr `.
1360
+ Updated by :func: `update_lines_cols `, :func: `resizeterm ` and
1361
+ :func: `resize_term `.
1362
+
1363
+ .. data :: LINES
1364
+
1365
+ The height of the screen, i.e., the number of lines.
1366
+ It is defined only after the call to :func: `initscr `.
1367
+ Updated by :func: `update_lines_cols `, :func: `resizeterm ` and
1368
+ :func: `resize_term `.
1369
+
1352
1370
1353
1371
Some constants are available to specify character cell attributes.
1354
1372
The exact constants available are system dependent.
Original file line number Diff line number Diff line change @@ -1045,8 +1045,8 @@ not just sequences. (Contributed by Serhiy Storchaka in :issue:`23171`.)
1045
1045
curses
1046
1046
------
1047
1047
1048
- The new :func: `~curses.update_lines_cols ` function updates the :envvar : `LINES `
1049
- and :envvar : `COLS ` environment variables. This is useful for detecting
1048
+ The new :func: `~curses.update_lines_cols ` function updates the :data : `LINES `
1049
+ and :data : `COLS ` module variables. This is useful for detecting
1050
1050
manual screen resizing. (Contributed by Arnon Yaari in :issue: `4254 `.)
1051
1051
1052
1052
Original file line number Diff line number Diff line change
1
+ Document the :mod: `curses ` module variables :const: `~curses.LINES ` and
2
+ :const: `~curses.COLS `.
You can’t perform that action at this time.
0 commit comments