()
| 23 | # curses import *' if you'll be needing the ACS_* constants. |
| 24 | |
| 25 | def initscr(): |
| 26 | import _curses, curses |
| 27 | # we call setupterm() here because it raises an error |
| 28 | # instead of calling exit() in error cases. |
| 29 | setupterm(term=_os.environ.get("TERM", "unknown"), |
| 30 | fd=_sys.__stdout__.fileno()) |
| 31 | stdscr = _curses.initscr() |
| 32 | for key, value in _curses.__dict__.items(): |
| 33 | if key.startswith('ACS_') or key in ('LINES', 'COLS'): |
| 34 | setattr(curses, key, value) |
| 35 | return stdscr |
| 36 | |
| 37 | # This is a similar wrapper for start_color(), which adds the COLORS and |
| 38 | # COLOR_PAIRS variables which are only available after start_color() is |
no test coverage detected
searching dependent graphs…