use io package from writing csv
This commit is contained in:
parent
c4ceb3cdae
commit
e73fa0afa9
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import io
|
||||
import imaplib
|
||||
import os
|
||||
import email
|
||||
@ -177,10 +178,12 @@ class Participation(object):
|
||||
self.registration_date.isoformat(), self._role, str(self.fee), str(self.farewell_event),
|
||||
str(self.gwinner_award), str(self.labtour), str(self._food_vegi), str(self._food_vegan),
|
||||
str(self._food_gluten), str(self._food_normal)]
|
||||
with open(filename, "w") as f:
|
||||
f.write("; ".join(header))
|
||||
f.write("\n")
|
||||
f.write("; ".join(values))
|
||||
|
||||
with io.open(filename, mode="w", encoding="UTF8") as fd:
|
||||
fd.write("; ".join(header))
|
||||
fd.write("\n")
|
||||
fd.write("; ".join(values))
|
||||
|
||||
return filename
|
||||
|
||||
def __str__(self):
|
||||
|
Loading…
Reference in New Issue
Block a user