a DOg) @s`dZddlTddlZddlZddZddZzeWne yRdd lmZYn0d 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^|dvr>t |||q>|S)NrZTERMunknown)ZtermfdZACS_)ZLINESZCOLS) _cursescursesZ setupterm_osenvironget_sys __stdout__filenoinitscr__dict__itemssetattr)rrstdscrkeyvaluer4/opt/alt/python39/lib64/python3.9/curses/__init__.pyrsrcCs@ddl}ddl}|}t|dr*|j|_t|dr<|j|_|S)NrCOLORS COLOR_PAIRS)rr start_colorhasattrrr)rrZretvalrrrr*s  r)has_keyc Osztt}tt|dz tWn Yn0||g|Ri|Wdtvrr|dtttSn(dtvr|dttt0dS)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(). rrrN) rZnoechoZcbreakZkeypadrlocalsZechoZnocbreakZendwin)funcargskwdsrrrrwrapper?s4      r!) __doc__rosrsysr rrr NameErrorr!rrrrs