i f& @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 }xR|j j D]A\}}|dddks|d kr_t |||q_q_W|S) NrZtermZTERMunknownfdZACS_LINESCOLS)rr) _cursescursesZ setupterm_osenvironget_sys __stdout__filenoinitscr__dict__itemssetattr)rr stdscrkeyvaluer4/opt/alt/python34/lib64/python3.4/curses/__init__.pyrs "rcCsdddl}ddl}|j}t|drB|j|_nt|dr`|j|_n|S)NrCOLORS COLOR_PAIRS)rr start_colorhasattrrr)rr Zretvalrrrr*s r)has_keycOszNt}tt|jdy tWnYnX||||SWddtkr|jdtttnXdS)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