
    F\h)                     ^    S r SSK7  SSKrSSKrS rS r \  S r
g! \	 a	    SSKJr   Nf = f)	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()
   ...

    )*Nc                  >   SS K n SS Kn[        [        R                  R                  SS5      [        R                  R                  5       S9  U R                  5       nU R                  R                  5        H"  u  p4USS S:X  d  US;   d  M  [        XU5        M$     U$ )Nr   TERMunknown)termfd   ACS_)LINESCOLS)_cursescurses	setupterm_osenvironget_sys
__stdout__filenoinitscr__dict__itemssetattr)r   r   stdscrkeyvalues        &/usr/lib/python3.13/curses/__init__.pyr   r      s~     3;;??695'')+__F&&,,.
q8v(9!9F' / M    c                      SS K n SS KnU R                  5       n[        U S5      (       a  U R                  Ul        [        U S5      (       a  U R
                  Ul        U$ )Nr   COLORSCOLOR_PAIRS)r   r   start_colorhasattrr    r!   )r   r   retvals      r   r"   r"   *   sK      "Fw!!w&&$00Mr      )has_keyc                    [        5       n[        5         [        5         UR                  S5         [	        5         U " U/UQ70 UD6S[        5       ;   a0  UR                  S5        [        5         [        5         [        5         $ $ !    NN= f! S[        5       ;   a0  WR                  S5        [        5         [        5         [        5         f f = f)a  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().
r%   r   r   )	r   noechocbreakkeypadr"   localsechonocbreakendwin)funcargskwdsr   s       r   wrapperr2   ?   s     	
 	a	M F*T*T* vxMM!FJH	  	
 vxMM!FJH	  s"   /B 
B B B
B A C)__doc__r   osr   sysr   r   r"   r&   	NameErrorr2    r   r   <module>r8      s@   
   "!&  ! !s    ,,