MCPcopy Index your code
hub / github.com/python/cpython / initscr

Function initscr

Lib/curses/__init__.py:25–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23# curses import *' if you'll be needing the ACS_* constants.
24
25def 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

Callers 1

wrapperFunction · 0.85

Calls 4

getMethod · 0.45
filenoMethod · 0.45
itemsMethod · 0.45
startswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…