Re: escape character / csv module
- From: anon <anon@xxxxxxxxx>
- Date: Thu, 01 Jul 2010 20:13:02 +0100
V N wrote:
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?
This will do what you want:
"\\x00"
.
- References:
- escape character / csv module
- From: V N
- escape character / csv module
- Prev by Date: Anyone using GPG or PGP encryption/signatures in your Python apps?
- Next by Date: Re: Solutions for hand injury from computer use
- Previous by thread: escape character / csv module
- Next by thread: Re: escape character / csv module
- Index(es):