def _list_panes(self):
        """
        Return list of panes in :py:obj:`dict` form.

        Retrieved from ``$ tmux(1) list-panes`` stdout.

        The :py:obj:`list` is derived from ``stdout`` in
        :class:`util.tmux_cmd` which wraps :py:class:`subprocess.Popen`.

        Returns
        -------
        list
        """

        pformats = [
            'session_name',
            'session_id',
            'window_index',
            'window_id',
            'window_name',
        ] + formats.PANE_FORMATS
        tmux_formats = ['#{%s}\t' % f for f in pformats]

        proc = self.cmd('list-panes', '-a', '-F%s' % ''.join(tmux_formats))  # output

        if proc.stderr:
            raise exc.LibTmuxException(proc.stderr)

        panes = proc.stdout

        pformats = [
            'session_name',
            'session_id',
            'window_index',
            'window_id',
            'window_name',
        ] + formats.PANE_FORMATS

        # combine format keys with values returned from ``tmux list-panes``
        panes = [dict(zip(pformats, window.split('\t'))) for window in panes]

        # clear up empty dict
        panes = [
            dict(
                (k, v) for k, v in window.items() if v or k == 'pane_current_path'
            )  # preserve pane_current_path, in case it entered a new process
            # where we may not get a cwd from.
            for window in panes
        ]

        if self._panes:
            self._panes[:] = []

        self._panes.extend(panes)

        return self._panes
Return list of panes in :py:obj:`dict` form.

        Retrieved from ``$ tmux(1) list-panes`` stdout.

        The :py:obj:`list` is derived from ``stdout`` in
        :class:`util.tmux_cmd` which wraps :py:class:`subprocess.Popen`.

        Returns
        -------
        list