From 821b96c6e86789a9a383bd219d308a7b7bc3aa9d Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Thu, 27 Aug 2020 16:34:42 +0200 Subject: [PATCH] Force \n as endline Closes: #15 On windows python uses \r\n when saving, but \n when loading so it is a mess. So i need to force it. --- relational/relation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relational/relation.py b/relational/relation.py index 4524834..4523237 100644 --- a/relational/relation.py +++ b/relational/relation.py @@ -113,7 +113,7 @@ class Relation: format as defined in RFC4180. ''' import csv - with open(filename, 'w') as fp: + with open(filename, 'w', newline='\n') as fp: writer = csv.writer(fp) # Creating csv writer # It wants an iterable containing iterables