From a73e4757adf9181b7789046990837b8e445130a2 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 2 Jul 2009 23:23:05 +0900 Subject: [PATCH] universal newlines when importing --- anki/importing/csvfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/importing/csvfile.py b/anki/importing/csvfile.py index 40922b6c9..9aeb56aca 100644 --- a/anki/importing/csvfile.py +++ b/anki/importing/csvfile.py @@ -71,7 +71,7 @@ class TextImporter(Importer): def openFile(self): self.dialect = None - self.fileobj = open(self.file, "rb") + self.fileobj = open(self.file, "rbU") self.data = self.fileobj.read() self.data = re.sub("^ *#.*", "", self.data) self.data = [x for x in self.data.split("\n") if x]