serhiy-storchaka · GitHub

ncurses provides "opaque" accessors that report state which the standard :mod:curses API can only set, never read back. These are not currently wrapped.

The window getters is_cleared, is_idcok, is_idlok, is_immedok, is_keypad, is_leaveok, is_nodelay, is_notimeout, is_pad, is_scrollok, is_subwin and is_syncok each return the value set by the matching setter (or, for is_pad/is_subwin, the kind of window).

The window value getters getdelay() (wgetdelay), getscrreg() (wgetscrreg) and getparent() (wgetparent) return the read timeout in milliseconds, the current scrolling region as a tuple, and the parent window (or None).

The module functions is_cbreak, is_echo, is_nl and is_raw report the current terminal mode set by cbreak, echo, nl and raw.

All of these are available when CPython is built against an ncurses with NCURSES_EXT_FUNCS (ncurses 5.9 and later).

Linked PRs

Read the original on github.com ↗