Index: Lib/test/test_curses.py =================================================================== --- Lib/test/test_curses.py (Revision 46972) +++ Lib/test/test_curses.py (Arbeitskopie) @@ -184,6 +184,7 @@ curses.unctrl('a') curses.ungetch('a') curses.use_env(1) + curses.resize_term(*stdscr.getmaxyx()) # Functions only available on a few platforms if curses.has_colors(): Index: Modules/_cursesmodule.c =================================================================== --- Modules/_cursesmodule.c (Revision 46972) +++ Modules/_cursesmodule.c (Arbeitskopie) @@ -2374,6 +2374,35 @@ return NULL; } } + +static PyObject * +PyCurses_Resize_Term(PyObject *self, PyObject *args) +{ + int lines; + int columns; + + PyCursesInitialised + + if (!PyArg_ParseTuple(args,"ii:resizeterm", &lines, &columns)) + return NULL; + + return PyCursesCheckERR(resizeterm(lines, columns), "resizeterm"); +} + +static PyObject * +PyCurses_Resize__Term(PyObject *self, PyObject *args) +{ + int lines; + int columns; + + PyCursesInitialised + + if (!PyArg_ParseTuple(args,"ii:resize_term", &lines, &columns)) + return NULL; + + return PyCursesCheckERR(resize_term(lines, columns), "resize_term"); +} + #endif /* STRICT_SYSV_CURSES */ /* List of functions defined in the module */ @@ -2458,6 +2487,8 @@ {"use_env", (PyCFunction)PyCurses_Use_Env, METH_VARARGS}, #ifndef STRICT_SYSV_CURSES {"use_default_colors", (PyCFunction)PyCurses_Use_Default_Colors, METH_NOARGS}, + {"resizeterm", (PyCFunction)PyCurses_Resize_Term, METH_VARARGS}, + {"resize_term", (PyCFunction)PyCurses_Resize__Term, METH_VARARGS}, #endif {NULL, NULL} /* sentinel */ };