Message291462
While I don't think that the csv module should second-guess broken input you might consider "fixing" your data on the fly:
def close_quote(line):
if line.count('"') % 2:
line = line.rstrip("\n") + '"\n'
return line
with open("data.csv") as f:
for row in csv.reader(map(close_quote, f)):
print(row)
That should give the desired output. |
|
Date |
User |
Action |
Args |
2017-04-11 07:39:06 | peter.otten | set | recipients:
+ peter.otten, rhettinger, r.david.murray, Mariatta, keef604 |
2017-04-11 07:39:06 | peter.otten | set | messageid: <1491896346.31.0.132533972885.issue30034@psf.upfronthosting.co.za> |
2017-04-11 07:39:06 | peter.otten | link | issue30034 messages |
2017-04-11 07:39:06 | peter.otten | create | |
|