;
Óâ"Ic               @   s   d  Z  d d l Z d „  Z d S(   u  curses.wrapper

Contains one function, wrapper(), which runs another function which
should be the rest of your curses-based application.  If the
application raises an exception, wrapper() will restore the terminal
to a sane state so you can read the resulting traceback.

i    Nc             O   s“   d } zZ t j ƒ  } t j ƒ  t j ƒ  | j d ƒ y t j ƒ  Wn Yn X|  | | | Ž SWd | j d ƒ t j ƒ  t j ƒ  t j	 ƒ  Xd S(   u  Wrapper 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().
    i   Ni    (
   u   Noneu   cursesu   initscru   noechou   cbreaku   keypadu   start_coloru   echou   nocbreaku   endwin(   u   funcu   argsu   kwdsu   resu   stdscr(    (    u+   /mit/python/lib/python3.0/curses/wrapper.pyu   wrapper   s    



(   u   __doc__u   cursesu   wrapper(    (    (    u+   /mit/python/lib/python3.0/curses/wrapper.pyu   <module>   s   