def splitline(line, size):
    """ Chop line into chunks of specified size. """
    result = []
    ptr = 0
    while ptr < len(line):
        chunk = line[ptr:ptr+size]
        result.append(chunk)
        ptr += size
    return result