def findAll(needle, haystack):
    """Find all occurrances of 'needle' in 'haystack', even overlapping ones.
       Returns a list of zero-based offsets.
       """
    results = []
    offset = 0
    while True:
        search = haystack[offset:]
        if not search:
            break
        x = search.find(needle)
        if x < 0:
            break
        results.append(offset + x)
        offset += x + 1
    return results