code: def set_window_size(self, rows, cols):
          
          if not self.can_naws:
              return
          self.window_size = rows, cols
          size = struct.pack('!HH', cols, rows)
          self.sock.send(IAC + SB + NAWS + size + IAC + SE)
docs: Change the size of the terminal window, if the remote end supports
          NAWS. If it doesn't, the method returns silently.