Commit 141706c6 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

Fix bug for multiple files

parent e40b8da8
......@@ -4,7 +4,7 @@ from __future__ import print_function
import glob
import csv
import itertools as it
def merge_cams_to_csv(directory, csvfile='merged_cams.csv'):
"""Merge *cam.txt files from a directory to a csv."""
......@@ -31,7 +31,7 @@ def merge_cams_to_csv(directory, csvfile='merged_cams.csv'):
# Write the final csv
with open(directory + csvfile, 'w') as fd:
writer = csv.writer(fd, delimiter=';')
writer.writerows(*csv_data)
writer.writerows(it.chain(*csv_data))
if __name__ == "__main__":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment