B äxácã@sbdZddlTddlZddlZdd„Zdd„ZyeWn e k rTdd lmZYnXd 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() ... é)Ú*NcCstddl}ddl}ttj dd¡tj ¡d|  ¡}x:|j   ¡D],\}}|dd…dks`|dkr@t |||ƒq@W|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/python37/lib64/python3.7/curses/__init__.pyrsrcCs@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¤|r|^}}n$d|kr"| d¡}ntdt|ƒƒ‚zDtƒ}tƒtƒ| d¡y tƒWn YnX||f|ž|ŽSdtƒkrž| d¡t ƒt ƒt ƒXdS)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(). Úfuncz7wrapper expected at least 1 positional argument, got %drNrr) ÚpopÚ TypeErrorÚlenrZnoechoZcbreakZkeypadrÚlocalsZechoZnocbreakZendwin)ÚargsÚkwdsrrrrrÚwrapper?s*       r$) Ú__doc__rÚosrÚsysr rrrÚ NameErrorr$rrrrÚ s