On 2/28/2018 8:35 PM, Tim Chase wrote:
While inelegant, I've "solved" this with a wrapper/generatorf = file(fname, …) g = (line.replace('\0', '') for line in f) reader = csv.reader(g, …) for row in reader: process(row)
I think this is elegant in that is cleans the input stream independently of the consumer. It is easier than what I was going to suggest, which is to read the cvs source for the line that raises the exception and modify the code until it works with \0 in the stream.
-- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
