def _monkeypatch_console():
 try:
  import termios
  import sys
  import pyrepl.unix_console
  uc = pyrepl.unix_console.UnixConsole
  old = uc.prepare
  def prep(self):
   old(self)
   f = sys.stdin.fileno()
   a = termios.tcgetattr(f)
   a[1] |= 1
   termios.tcsetattr(f, termios.TCSANOW, a)
  uc.prepare = prep
 except:
  pass

def _monkeypatch_console ( ) : try : import termios import sys import pyrepl . unix_console uc = pyrepl . unix_console . UnixConsole old = uc . prepare def prep ( self ) : old ( self ) f = sys . stdin . fileno ( ) a = termios . tcgetattr ( f ) a [ 1 ] |= 1 termios . tcsetattr ( f , termios . TCSANOW , a ) uc . prepare = prep except : pass
the readline in pypy turns off output postprocessing .