CSVTool 0.1 released
CSVTool has four modes - reader (single line)
, reader (multi line)
, writer (single line)
and writer (multi line)
.
Below is usage example in Python Script:
# CSV Tool object csvtool = getattr(container, 'csv_tool') txt = 'Hi,How,Are,You?' csvtool.setMode('reader (single line)') result = csvtool(txt) # result is ['Hi', 'How', 'Are', 'You?'] lst = ['wow','fuckin','cool'] csvtool.setMode('writer (single line)') csvtool.setDelimiter('colon') result = csvtool(lst) # result is 'wow:fuckin:cool'
Try this (on Zope 2.7+ based on Python 2.3+ that has csv module)!