sonald> Can anybody tell me how to change the text delimiter in FastCSV
sonald> Parser? By default the text delimiter is double quotes(") I
sonald> want to change it to anything else... say a pipe (|).. can
sonald> anyone please tell me how do i go about it?
I'm not familiar with a FastCSV module in Python. Google suggests there is
a FastCsv module in Ruby.
Just in case what you are really referring to is the csv module in Python,
here's how you do it. Suppose your CSV file looks like an Excel-generated
CSV file save for the weird quote character:
import csv
class PipeQuote(csv.excel):
quotechar='|'
...
reader = csv.reader(open("somefile", "rb"), dialect=PipeQuote)
for row in reader:
print row
Full documentation is here:
http://docs.python.org/dev/lib/module-csv.html
Skip
--
http://mail.python.org/mailman/listinfo/python-list