def load(filename):
    """Read words from a words file, into sections.
    # is a comment
    = is a section break
    any other lines are words
    """
    sections = []
    f = open(filename)
    while True:
        line = f.readline()
        line = line.strip()
        if line == "": break

        if line.startswith('#'):
            pass # ignore comments

        elif line.startswith('='):
            # start a new section
            sections.append([])
        else:
            # it's a word, add to present section
            (sections[len(sections)-1]).append(line)
    f.close()

    return sections