[New-bugs-announce] [issue1940] curses.filter can not be used as described in its documentation
report at bugs.python.org
Sat Jan 26 13:57:46 CET 2008
New submission from Robin Bryce:
curses.filter forces the top most window to 1 line tall and preserves
existing tty content. It must be called *before* curses.initscr in order
to acheive this.
The python documentation states that curses.filter must be called before
initscr but the implementation prevents this. It uses the
NoArgNoReturnVoidFunction macro defined in Include/py_curses.h. This
macro in turn invokes the PyCursesInitialised macro which forces an
error if initscr has not been called.
curses.filter needs an explicit definition to avoid this:
Replacing "NoArgNoReturnVoidFunction(filter)" in Modules/_cursesmodule.c
static PyObject *PyCurses_filter (PyObject *self)
/* MUST NOT BE PyCursesInitialised */
Would allow curses.filter to be called as documented. But really should
get a check for "!PyCursesInitialised".
components: Documentation, Library (Lib)
title: curses.filter can not be used as described in its documentation
versions: Python 2.5
Tracker <report at bugs.python.org>
More information about the New-bugs-announce