o [d) @s`dZddlTddlZddlZddZddZzeWne y)dd lmZYnwd d Z dS) zcurses The main package for curses support for Python. Normally used by importing the package, and perhaps a particular module inside it. import curses from curses import textpad curses.initscr() ... )*NcCspddl}ddl}ttjddtjd| }|j D]\}}|dddks/|dvr5t |||q|S)NrTERMunknown)termfdACS_)LINESCOLS) _cursescurses setupterm_osenvironget_sys __stdout__filenoinitscr__dict__itemssetattr)r r stdscrkeyvaluer&/usr/lib/python3.10/curses/__init__.pyrs rcCs@ddl}ddl}|}t|dr|j|_t|dr|j|_|S)NrCOLORS COLOR_PAIRS)r r start_colorhasattrrr)r r retvalrrrr*s  r)has_keyc Osz8t}tt|dztWnY||g|Ri|Wdtvr8|dtttSSdtvrM|dtttww)aWrapper function that initializes curses and calls another function, restoring normal keyboard/screen behavior on error. The callable object 'func' is then passed the main window 'stdscr' as its first argument, followed by any other arguments passed to wrapper(). r"rr) rnoechocbreakkeypadrlocalsechonocbreakendwin)funcargskwdsrrrrwrapper?s*     r.) __doc__r osrsysrrrr# NameErrorr.rrrrs