def gen_open_files(filepaths):
    """
    Open a sequence of filenames one at a time producing a file object.
    The file is closed immediately when proceeding to the next iteration.
    :param filenames: List of filepaths to open
    :return: Generator of opened files

    Example:
        files = gen_opener(filenames)
    """
    for filepath in filepaths:
        f = open(filepath, 'rt')
        yield f
        f.close()
