MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / has_key

Function has_key

tools/python-3.11.9-amd64/Lib/curses/has_key.py:162–176  ·  view source on GitHub ↗
(ch)

Source from the content-addressed store, hash-verified

160 }
161
162def has_key(ch):
163 if isinstance(ch, str):
164 ch = ord(ch)
165
166 # Figure out the correct capability name for the keycode.
167 capability_name = _capability_names.get(ch)
168 if capability_name is None:
169 return False
170
171 #Check the current terminal description for that capability;
172 #if present, return true, else return false.
173 if _curses.tigetstr( capability_name ):
174 return True
175 else:
176 return False
177
178if __name__ == '__main__':
179 # Compare the output of this implementation and the ncurses has_key,

Callers 1

has_key.pyFile · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected