code: def _handle_resize(self, signum=None, frame=None):
          'Tries to catch resize signals sent from the terminal.'
  
          h, w = array('h', ioctl(self.fd, termios.TIOCGWINSZ, '\0' * 8))[:2]
          self.term_width = f _handle_resize(self, signum=None, frame=None):
          'Tries to catch resize signals sent from the terminal.'
  
          h, w = array('h', ioctl(self.fd, termios.TIOCGWINSZ, '\0' * 8))[:2]
          self.term_width = w
docs: Tries to catch resize signals sent from the terminal.