def split_escaped(s, glue=',', preserve=False):
    """Handle single-char escapes using backslash."""
    buf = []
    it = iter(s)
    for c in it:
        if c == glue:
            yield ''.join(buf)
            del buf[:]
        elif c == '\\':
            if preserve:
                buf.append(c)
            c = next(it)
            buf.append(c)
        else:
            buf.append(c)
    if buf:
        yield ''.join(buf)
