o ?Og) @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)NrZTERMunknown)ZtermfdZACS_)ZLINESZCOLS) _cursescursesZ setupterm_osenvironget_sys __stdout__filenoinitscr__dict__itemssetattr)rrstdscrkeyvaluer6/opt/alt/python310/lib64/python3.10/curses/__init__.pyrs rcCs@ddl}ddl}|}t|dr|j|_t|dr|j|_|S)NrCOLORS COLOR_PAIRS)rr start_colorhasattrrr)rrZretvalrrrr*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(). rrr) rZnoechoZcbreakZkeypadrlocalsZechoZnocbreakZendwin)funcargskwdsrrrrwrapper?s*     r!) __doc__rosrsysr rrr NameErrorr!rrrrs