Yf& @s}dZddlTddlZddlZddZddZyeWn"e k rldd lmZYnXd 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() ... )*NcCsddl}ddl}tdtjjdddtjj|j }xO|j j D]>\}}|dddks|d kr_t |||q_W|S) NrZtermZTERMunknownfdZACS_LINESCOLS)rr) _cursescursesZ setupterm_osenvironget_sys __stdout__filenoinitscr__dict__itemssetattr)rr stdscrkeyvaluer4/opt/alt/python35/lib64/python3.5/curses/__init__.pyrs "rcCs^ddl}ddl}|j}t|dr?|j|_t|drZ|j|_|S)NrCOLORS COLOR_PAIRS)rr start_colorhasattrrr)rr Zretvalrrrr*s   r)has_keycOszNt}tt|jdy tWnYnX||||SWddtkr|jdtttXdS)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(). rNrr) rZnoechoZcbreakZkeypadrlocalsZechoZnocbreakZendwin)funcargskwdsrrrrwrapper?s    r#) __doc__rosr sysr rrr NameErrorr#rrrr s