o
0¦i)
ã @ s` d Z ddlT ddlZddlZdd„ Zdd„ Zze W n e y) dd lmZ Y nw d
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()
...
é )Ú*Nc C sp dd l } dd l}ttj dd¡tj ¡ d� | ¡ }| j
¡ D ]\}}|dd… dks/|dv r5t|||ƒ q|S )Nr ZTERMÚunknown)ZtermÚfdé ZACS_)ZLINESZCOLS)
Ú_cursesÚcursesZ setuptermÚ_osÚenvironÚgetÚ_sysÚ
__stdout__ÚfilenoÚinitscrÚ__dict__ÚitemsÚsetattr)r r ÚstdscrÚkeyÚvalue© r ú6/opt/alt/python310/lib64/python3.10/curses/__init__.pyr s ÿ€r c C s@ dd l } dd l}| ¡ }t| dƒr| j|_t| dƒr| j|_|S )Nr ÚCOLORSÚCOLOR_PAIRS)r r Ústart_colorÚhasattrr r )r r Zretvalr r r r * s
r é )Úhas_keyc O sœ z8t ƒ }tƒ tƒ | d¡ ztƒ W n Y | |g|¢R i |¤ŽW dtƒ v r8| d¡ tƒ tƒ tƒ S S dtƒ v rM| d¡ tƒ tƒ tƒ w w )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 ZnoechoZcbreakZkeypadr ÚlocalsZechoZnocbreakZendwin)ÚfuncÚargsÚkwdsr r r r Úwrapper? s*
ü
ür! )Ú__doc__r Úosr Úsysr r r r Ú NameErrorr! r r r r Ú