code: def _list_windows(self):
          
  
          wformats = ['session_name', 'session_id'] + formats.WINDOW_FORMATS
          tmux_formats = ['#{%s}' % format for format in wformats]
  
          proc = self.cmd(
              'list-windows',  # ``tmux list-windows``
              '-a',
              '-F%s' % '\t'.join(tmux_formats),  # output
          )
  
          if proc.stderr:
              raise exc.LibTmuxException(proc.stderr)
  
          windows = proc.stdout
  
          wformats = ['session_name', 'session_id'] + formats.WINDOW_FORMATS
  
          # combine format keys with values returned from ``tmux list-windows``
          windows = [dict(zip(wformats, window.split('\t'))) for window in windows]
  
          # clear up empty dict
          windows = [dict((k, v) for k, v in window.items() if v) for window in windows]
  
          # tmux < 1.8 doesn't have window_id, use window_name
          for w in windows:
              if 'window_id' not in w:
                  w['window_id'] = w['window_name']
  
          if self._windows:
              self._windows[:] = []
  
          self._windows.extend(windows)
  
          return self._windows
docs: Return list of windows in :py:obj:`dict` form.
  
          Retrieved from ``$ tmux(1) list-windows`` stdout.
  
          The :py:obj:`list` is derived from ``stdout`` in
          :class:`common.tmux_cmd` which wraps :py:class:`subprocess.Popen`.
  
          Returns
          -------
          list of dict