mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
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:
parent
43bc3788c0
commit
4994d9546c
6 changed files with 277 additions and 5 deletions
|
|
@ -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'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue