code: def get_size(self):
          
          attr = self._get_console_info()
          cols = attr['window']['right'] - attr['window']['left'] + 1
          lines = attr['window']['bottom'] - attr['window']['top'] + 1
          return cols, lines
docs: see doc in Term class