/usr/lib64/python3.9/curses/__pycache__
Edit: /usr/lib64/python3.9/curses/__pycache__/__init__.cpython-39.pyc (1861B)
a
´i)
ã @ s` d Z ddlT ddlZddlZdd„ Zdd„ Zze W n e yR dd lmZ Y n0 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 r>t|||ƒ q>|S )Nr ZTERMÚunknown)ZtermÚfdé ZACS_)ÚLINESZCOLS)
Ú_cursesÚcursesZ setuptermÚ_osÚenvironÚgetÚ_sysÚ
__stdout__ÚfilenoÚinitscrÚ__dict__ÚitemsÚsetattr)r r ÚstdscrÚkeyÚvalue© r ú'/usr/lib64/python3.9/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¢ ztt ƒ }tƒ tƒ | d¡ z
tƒ W n Y n0 | |g|¢R i |¤ŽW dtƒ v rr| d¡ tƒ tƒ tƒ S n(dtƒ v rœ| d¡ tƒ tƒ tƒ 0 dS )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 N) r ZnoechoZcbreakZkeypadr ÚlocalsZechoZnocbreakZendwin)ÚfuncÚargsÚkwdsr r r r Úwrapper? s4
ù ü
r" )Ú__doc__r Úosr Úsysr r r r Ú NameErrorr" r r r r Ú
s