From a171a29afbfbc6013df92650967cdd3ad31e4a8f Mon Sep 17 00:00:00 2001 From: dabura667 Date: Sun, 25 Jan 2015 12:22:40 +0900 Subject: [PATCH] Fix the line deliminator in csv currently the csv output is `\r\r\n` where the line terminator is `\r\n` and the extra `\r` is probably being inserted from writing a dict to csv. I get around this by changing the line terminator to `\n` to output `\r\n` which will make it compatible with most spreadsheet apps. --- gui/qt/main_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index ca993abc2..1ff6f310f 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -2507,7 +2507,7 @@ class ElectrumWindow(QMainWindow): with open(fileName, "w+") as f: if is_csv: - transaction = csv.writer(f) + transaction = csv.writer(f, lineterminator='\n') transaction.writerow(["transaction_hash","label", "confirmations", "value", "fee", "balance", "timestamp"]) for line in lines: transaction.writerow(line)