

def parse_body(source):
    'Reads lines of the main screenplay and generates paragraph objects.'
    paragraphs = []
    for (blank, input_lines) in itertools.groupby(source, _is_blank):
        if (not blank):
            paragraph = InputParagraph(list(input_lines))
            paragraph.update_list(paragraphs)
    return paragraphs

dataset/ETHPy150Open vilcans/screenplain/screenplain/parsers/fountain.py parse_body/original