How to give 2 characters for "delimiter" using csv module?
<p>I'm trying to generate the csv with delimiter '@|@' but, I couldn't achieve through below code.</p>

<pre><code>import csv
ifile  = open('test.csv', "rb")
reader = csv.reader(ifile)
ofile  = open('ttest.csv', "wb")
writer = csv.writer(ofile, delimiter='|', quotechar='"', quoting=csv.QUOTE_ALL)
for row in reader:
    writer.writerow(row)
ifile.close()
ofile.close()
</code></pre>

<p>While running, It has thrown below error.</p>

<pre class="lang-none prettyprint-override"><code>Traceback (most recent call last):

File "csvfile.py", line 6, in &lt;module&gt;
writer = csv.writer(ofile, delimiter='@|@', quotechar='"', quoting=csv.QUOTE_ALL)
TypeError: "delimiter" must be an 1-character string
</code></pre>

<p>How can I achieve this?</p>