From ecddc6332c7c526b5dbf772e53fcacf68dd5b866 Mon Sep 17 00:00:00 2001 From: Niclas Dobbertin Date: Wed, 4 Oct 2023 12:49:14 +0200 Subject: csv filewrite to documentation --- bjoern/videoanalyse/LogParser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bjoern') diff --git a/bjoern/videoanalyse/LogParser.py b/bjoern/videoanalyse/LogParser.py index 0633fd8..b41804d 100755 --- a/bjoern/videoanalyse/LogParser.py +++ b/bjoern/videoanalyse/LogParser.py @@ -117,7 +117,7 @@ def generate_log(activities: dict): def write_logfile(vp_dir, log): path = Path(f"{vp_dir}/logs.csv") - with open(path, "w") as csvfile: + with open(path, "w", newline="") as csvfile: writer = csv.writer( csvfile, delimiter=",", quoting=csv.QUOTE_NONNUMERIC, lineterminator="\n" ) -- cgit v1.2.3