Patch #1506645: add Python wrappers for the curses functions

is_term_resized, resize_term and resizeterm. This uses three
separate configure checks (one for each function).
This commit is contained in:
Walter Dörwald 2006-06-19 08:07:50 +00:00
parent 43bc3788c0
commit 4994d9546c
6 changed files with 277 additions and 5 deletions

View file

@ -212,6 +212,13 @@ def module_funcs(stdscr):
m = curses.getmouse()
curses.ungetmouse(*m)
if hasattr(curses, 'is_term_resized'):
curses.is_term_resized(*stdscr.getmaxyx())
if hasattr(curses, 'resizeterm'):
curses.resizeterm(*stdscr.getmaxyx())
if hasattr(curses, 'resize_term'):
curses.resize_term(*stdscr.getmaxyx())
def unit_tests():
from curses import ascii
for ch, expected in [('a', 'a'), ('A', 'A'),