#1940: make it possible to use curses.filter() before curses.initscr()

as the documentation says.
This commit is contained in:
Georg Brandl 2008-01-26 14:03:47 +00:00
parent 2a7d991c6c
commit 29604a1b4c
2 changed files with 14 additions and 1 deletions

View file

@ -1677,10 +1677,19 @@ NoArgTrueFalseFunction(has_colors)
NoArgTrueFalseFunction(has_ic)
NoArgTrueFalseFunction(has_il)
NoArgTrueFalseFunction(isendwin)
NoArgNoReturnVoidFunction(filter)
NoArgNoReturnVoidFunction(flushinp)
NoArgNoReturnVoidFunction(noqiflush)
static PyObject *
PyCurses_filter(PyObject *self)
{
/* not checking for PyCursesInitialised here since filter() must
be called before initscr() */
filter();
Py_INCREF(Py_None);
return Py_None;
}
static PyObject *
PyCurses_Color_Content(PyObject *self, PyObject *args)
{