a €šçd) ã@s`dZddlTddlZddlZdd„Zdd„ZzeWne yRdd lmZYn0d d „Z dS) zØcurses 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}ttj dd¡tj ¡d|  ¡}|j   ¡D],\}}|dd…dks^|dvr>t |||ƒq>|S)NrZTERMÚunknown)ZtermÚfdéZACS_)ZLINESZCOLS) Ú_cursesÚcursesZ setuptermÚ_osÚenvironÚgetÚ_sysÚ __stdout__ÚfilenoÚinitscrÚ__dict__ÚitemsÚsetattr)rrÚstdscrÚkeyÚvalue©rú4/opt/alt/python39/lib64/python3.9/curses/__init__.pyrsÿrcCs@ddl}ddl}| ¡}t|dƒr*|j|_t|dƒr<|j|_|S)NrÚCOLORSÚ COLOR_PAIRS)rrÚ start_colorÚhasattrrr)rrZretvalrrrr*s  ré)Úhas_keyc Os¢zttƒ}tƒtƒ| d¡z tƒWn Yn0||g|¢Ri|¤ŽWdtƒvrr| d¡tƒtƒtƒSn(dtƒvrœ| d¡tƒtƒtƒ0dS)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) rZnoechoZcbreakZkeypadrÚlocalsZechoZnocbreakZendwin)ÚfuncÚargsÚkwdsrrrrÚwrapper?s4    ùü  r!) Ú__doc__rÚosrÚsysr rrrÚ NameErrorr!rrrrÚs