Is there a way to split a string without splitting escaped character? For example, I have a string and want to split by \':\' and not by \'\\:\'
http\\://ww         
        
I think a simple C like parsing would be much more simple and robust.
def escaped_split(str, ch):
    if len(ch) > 1:
        raise ValueError('Expected split character. Found string!')
    out = []
    part = ''
    escape = False
    for i in range(len(str)):
        if not escape and str[i] == ch:
            out.append(part)
            part = ''
        else:
            part += str[i]
            escape = not escape and str[i] == '\\'
    if len(part):
        out.append(part)
    return out