So can I call the generator twice and receive the same file twice in 2 for loops?
Once to get the files name and the second to process? for file in rootobs: base = os.path.basename(file.name) write_to = os.path.join("output", os.path.splitext(base)[0] + ".csv") with open(write_to, 'w', newline='') as csvf: for file in rootobs: # create and write csv Cheers Sayth -- https://mail.python.org/mailman/listinfo/python-list