Debian Codegraph @

lib_pypy/pyrepl/curses.py

raw symbols SCIP
1 # Copyright 2000-2010 Michael Hudson-Doyle <[email protected]>
2 # Armin Rigo
3 #
4 # All Rights Reserved
5 #
6 #
7 # Permission to use, copy, modify, and distribute this software and
8 # its documentation for any purpose is hereby granted without fee,
9 # provided that the above copyright notice appear in all copies and
10 # that both that copyright notice and this permission notice appear in
11 # supporting documentation.
12 #
13 # THE AUTHOR MICHAEL HUDSON DISCLAIMS ALL WARRANTIES WITH REGARD TO
14 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15 # AND FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
16 # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
17 # RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
18 # CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
19 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20
21 import sys
22
23 if '__pypy__' in sys.builtin_module_names:
24 # pypy case
25 import _minimal_curses as _curses
26 else:
27 try:
28 import _curses
29 except ImportError:
30 try:
31 import curses as _curses # type: ignore[no-redef]
32 except ImportError:
33 from . import _minimal_curses as _curses # type: ignore[no-redef]
34
35 setupterm = _curses.setupterm
36 tigetstr = _curses.tigetstr
37 tparm = _curses.tparm
38 error = _curses.error