Skip to content
Open
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
4 changes: 4 additions & 0 deletions Lib/curses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"""

from _curses import *
import _curses
import os as _os
import sys as _sys

Expand All @@ -33,6 +34,7 @@ def initscr():
if key.startswith(('ACS_', 'WACS_')) or key in ('LINES', 'COLS'):
setattr(curses, key, value)
return stdscr
initscr.__doc__ = _curses.initscr.__doc__

# newterm() is wrapped for the same reason as initscr(): the ACS_* and WACS_*
# constants and LINES/COLS only become available once a terminal is
Expand All @@ -50,6 +52,7 @@ def newterm(type=None, fd=None, infd=None, /):
if key.startswith(('ACS_', 'WACS_')) or key in ('LINES', 'COLS'):
setattr(curses, key, value)
return screen
newterm.__doc__ = _curses.newterm.__doc__

# This is a similar wrapper for start_color(), which adds the COLORS and
# COLOR_PAIRS variables which are only available after start_color() is
Expand All @@ -60,6 +63,7 @@ def start_color():
_curses.start_color()
curses.COLORS = _curses.COLORS
curses.COLOR_PAIRS = _curses.COLOR_PAIRS
start_color.__doc__ = _curses.start_color.__doc__

# Import Python has_key() implementation if _curses doesn't contain has_key()

Expand Down
11 changes: 9 additions & 2 deletions Modules/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -5534,7 +5534,14 @@ static PyMethodDef PyCursesScreen_methods[] = {
{NULL, NULL} /* sentinel */
};

PyDoc_STRVAR(PyCursesScreen_Type_doc,
"A curses screen.\n"
"\n"
"Screen objects are returned by newterm() and new_prescr(), and represent\n"
"a terminal together with its standard window, stdscr.");

static PyType_Slot PyCursesScreen_Type_slots[] = {
{Py_tp_doc, (void *)PyCursesScreen_Type_doc},
{Py_tp_methods, PyCursesScreen_methods},
{Py_tp_getset, PyCursesScreen_getsets},
{Py_tp_dealloc, PyCursesScreen_dealloc},
Expand Down Expand Up @@ -6929,12 +6936,12 @@ _curses.initscr

Initialize the library.

Return a WindowObject which represents the whole screen.
Return a window object which represents the whole screen.
[clinic start generated code]*/

static PyObject *
_curses_initscr_impl(PyObject *module)
/*[clinic end generated code: output=619fb68443810b7b input=514f4bce1821f6b5]*/
/*[clinic end generated code: output=619fb68443810b7b input=e2bf3a061b7d948a]*/
{
WINDOW *win;

Expand Down
4 changes: 2 additions & 2 deletions Modules/clinic/_cursesmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading