def parse_exec_cmds(inp):

    if inp.count('"') == 2:
        return [inp[1:-1]]
    else:
        # server side regex guarantees that these quotes will be in the
        # correct place -- the space between two commands
        third_quote = inp.find('" "') + 2
        first_cmd = inp[:third_quote-1]
        rest = inp[third_quote:]
        return [first_cmd[1:-1]] + parse_exec_cmds(rest)
Parse string provided by server `exec' command.
dataset/ETHPy150Open mossberg/poet/poet/modules/exec.py/parse_exec_cmds