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

Method get_stty_echo

Lib/test/libregrtest/save_env.py:303–309  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

301 warnings.showwarning = fxn
302
303 def get_stty_echo(self):
304 termios = self.try_get_module('termios')
305 if not os.isatty(fd := sys.__stdin__.fileno()):
306 return None
307 attrs = termios.tcgetattr(fd)
308 lflags = attrs[3]
309 return bool(lflags & termios.ECHO)
310 def restore_stty_echo(self, echo):
311 termios = self.get_module('termios')
312 attrs = termios.tcgetattr(fd := sys.__stdin__.fileno())

Callers

nothing calls this directly

Calls 3

try_get_moduleMethod · 0.95
isattyMethod · 0.45
filenoMethod · 0.45

Tested by

no test coverage detected