[Tutor] De-CSV-ing?

Simon Brunning SBrunning@trisystems.co.uk
Tue, 5 Jun 2001 09:21:14 +0100


> From:	Curtis Larsen [SMTP:curtis.larsen@Covance.Com]
> What would be the easiest (or simplest) way to convert a line from a CSV
> file into a list or tuple?
 
Well, the usual way of decoding csv files is to use a finite state machine -
see
<http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?query=finite+state+machine>.
Don't worry, that aren't as complicated as this page makes them sound!

But before writing anything yourself, it's often worth seeing if anyone else
has written something useful. After all, csv file processing is pretty
common, so someone else is *bound* to have done this before.

The first place to look is the Vaults of Parnassus -
<http://www.vex.net/parnassus/>. Searching there for 'csv' takes me to a
link to the 'ASV' module.

Hmmm. The ASV page seems to be down. But the module can still be downloaded
- <http://tratt.net/~laurie/python/asv/releases/asv-0.4.tar.gz>. See here -
<http://www.google.com/search?q=cache:2bPuHjkjtk4:tratt.net/~laurie/python/a
sv/+Python+asv&hl=en&lr=lang_en> for google's cache of the ASV page.

Hope this helps...

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning@trisystems.co.uk






-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.