@documented_contextmanager
def char_buffered(pipe):
 if (win32 or (not isatty(pipe))):
  (yield)
 else:
  old_settings = termios.tcgetattr(pipe)
  tty.setcbreak(pipe)
  try:
   (yield)
  finally:
   termios.tcsetattr(pipe, termios.TCSADRAIN, old_settings)

@ documented_contextmanager def char_buffered ( pipe ) : if ( win32 or ( not isatty ( pipe ) ) ) : ( yield ) else : old_settings = termios . tcgetattr ( pipe ) tty . setcbreak ( pipe ) try : ( yield ) finally : termios . tcsetattr ( pipe , termios . TCSADRAIN , old_settings )
force local terminal pipe be character .