escape character / csv module

V N vijay.nori at gmail.com
Thu Jul 1 13:10:31 EDT 2010


string "\x00" has a length of 1.  When I use the csv module to write
that to a file

csv_f = csv.writer(file("test.csv","wb"),delimiter="|")
csv_f.writerow(["\x00","zz"])

The output file looks like this:
|zz

Is it possible to force the writer to write that string?



More information about the Python-list mailing list