You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add curses state-query functions: is_keypad, is_cbreak, getparent, etc. #151776
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).
Activity
pythongh-151776: Raise the c-analyzer size limit for _cursesmodule.c
gh-151776: Add curses state-query functions (GH-151778)
gh-151776: Fix test_state_getters on terminals without insert/delete …