def capture_pane(pane_idstr,filename):
    """
    capture pane content and save in given filename.
    the format of pane_idstr is: sessionName:winIdx.paneIdx
    """
    #read the config to decide if backup the ansi escapes
    p = ('e' if config.CNT_WITH_ESC else '', pane_idstr)
    cmd = (p % CMD_CAPTURE_PANE).split(config.CMD_SEP)
    util.exec_cmd_redir(cmd, filename)
dataset/ETHPy150Open sk1418/retmux/tmuxbk/cmd.py/capture_pane/swapped operands of `%`