Skip to content
Snippets Groups Projects
Commit cc30e47d authored by Alice Brenon's avatar Alice Brenon
Browse files

Tell python to behave with end of lines

parent 45f79db5
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ def getAttribute(article, attribute): ...@@ -12,7 +12,7 @@ def getAttribute(article, attribute):
return result.get('value') if result else '' return result.get('value') if result else ''
def main(rootDirectory): def main(rootDirectory):
output = csv.writer(sys.stdout) output = csv.writer(sys.stdout, lineterminator='\n')
output.writerow(header) output.writerow(header)
for t in range(1,18): for t in range(1,18):
path = f"{rootDirectory}/T{t}" path = f"{rootDirectory}/T{t}"
......
...@@ -139,7 +139,7 @@ def interesting(arrow): ...@@ -139,7 +139,7 @@ def interesting(arrow):
def getMetadata(arrows, path=None): def getMetadata(arrows, path=None):
output = sys.stdout if path is None else open(path, 'w') output = sys.stdout if path is None else open(path, 'w')
toCsv = csv.writer(output) toCsv = csv.writer(output, lineterminator='\n')
toCsv.writerow(['id', 'tome', 'rank', 'head', 'domain']) toCsv.writerow(['id', 'tome', 'rank', 'head', 'domain'])
for arrow in arrows: for arrow in arrows:
toCsv.writerow([ toCsv.writerow([
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment