Index: Lib/telnetlib.py =================================================================== --- Lib/telnetlib.py (revision 85670) +++ Lib/telnetlib.py (working copy) @@ -552,7 +552,7 @@ line = sys.stdin.readline() if not line: break - self.write(line) + self.write(line.encode('ascii')) def listener(self): """Helper for mt_interact() -- this executes in the other thread.""" @@ -563,7 +563,7 @@ print('*** Connection closed by remote host ***') return if data: - sys.stdout.write(data) + sys.stdout.write(data.decode('ascii')) else: sys.stdout.flush()