Screwing Up looping in Generator

Sayth Renshaw flebber.crue at gmail.com
Tue Jan 3 18:09:40 EST 2017


For completeness I was close this is the working code.

def get_list_of_names(generator_arg):
    name_set = set()
    for name in generator_arg:
        base = os.path.basename(name.name)
        filename = os.path.splitext(base)[0]
        name_set.add(filename)
    return name_set


def data_attr(roots):
    """Get the root object and iter items."""
    for name in names:
        directory = "output"
        write_name = name + ".csv"
        with open(os.path.join(directory, write_name), 'w', newline='') as
csvf:
            race_writer = csv.writer(csvf, delimiter=','
)


thanks for your time and assistance. It's much appreciated

Sayth



More information about the Python-list mailing list