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 @@ -641,7 +641,8 @@ The module :mod:`curses` defines the following functions:
641641
642642.. function :: update_lines_cols()
643643
644- Update :envvar: `LINES ` and :envvar: `COLS `. Useful for detecting manual screen resize.
644+ Update the :const: `LINES ` and :const: `COLS ` module variables.
645+ Useful for detecting manual screen resize.
645646
646647 .. versionadded :: 3.5
647648
@@ -1342,10 +1343,27 @@ The :mod:`curses` module defines the following data members:
13421343.. data :: COLORS
13431344
13441345 The maximum number of colors the terminal can support.
1346+ It is defined only after the call to :func: `start_color `.
13451347
13461348.. data :: COLOR_PAIRS
13471349
13481350 The maximum number of color pairs the terminal can support.
1351+ It is defined only after the call to :func: `start_color `.
1352+
1353+ .. data :: COLS
1354+
1355+ The width of the screen, i.e., the number of columns.
1356+ It is defined only after the call to :func: `initscr `.
1357+ Updated by :func: `update_lines_cols `, :func: `resizeterm ` and
1358+ :func: `resize_term `.
1359+
1360+ .. data :: LINES
1361+
1362+ The height of the screen, i.e., the number of lines.
1363+ It is defined only after the call to :func: `initscr `.
1364+ Updated by :func: `update_lines_cols `, :func: `resizeterm ` and
1365+ :func: `resize_term `.
1366+
13491367
13501368Some constants are available to specify character cell attributes.
13511369The 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`.)
10451045curses
10461046------
10471047
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
10501050manual screen resizing. (Contributed by Arnon Yaari in :issue: `4254 `.)
10511051
10521052
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