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

Method restore_stty_echo

Lib/test/libregrtest/save_env.py:310–319  ·  view source on GitHub ↗
(self, echo)

Source from the content-addressed store, hash-verified

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())
313 if echo:
314 # Turn echo on.
315 attrs[3] |= termios.ECHO
316 else:
317 # Turn echo off.
318 attrs[3] &= ~termios.ECHO
319 termios.tcsetattr(fd, termios.TCSADRAIN, attrs)
320
321 def resource_info(self):
322 for name in self.resources:

Callers

nothing calls this directly

Calls 2

get_moduleMethod · 0.95
filenoMethod · 0.45

Tested by

no test coverage detected