(line, i, n)
return line[start:i].strip(), i
Separate one key-value pair in a mailcap entry.
Separate one key-value pair in a mailcap entry.
Separate one key - value pair in a mailcap entry .
def parsefield(line, i, n):
    """Separate one key-value pair in a mailcap entry."""
    start = i
    while i < n:
        c = line[i]
        if c == ';':
            break
        elif c == '\\':
            i = i+2
        else:
            i = i+1
    return line[start:i].strip(), i
def parsefield ( line , i , n ) : start = i while i < n : c = line [ i ] if c == ';' : break elif c == '\\' : i = i + 2 else : i = i + 1 return line [ start : i ] . strip ( ) , i