PEP 305 - CSV File API

Tyler Eaves tyler at cg1.org
Sun Feb 2 03:12:13 CET 2003


Max M unleashed the following on comp.lang.python:
> 
> 
> Andrew Dalke wrote:
>> Skip Montanaro wrote:
>> 
>>> A new PEP (305), "CSV File API", is available for reader feedback.  
>>> This PEP
>>> describes an API and implementation for reading and writing CSV files.
> 
> 
> Without commenting on the API itself, I will say that it is a very good 
> idea to have a module like that in the standard library. It is used *so* 
> often.

Yea, I see this being implemented more as a module (If even that...)

This stuff is really pretty trivial.

For what I need, the following is typical:

import string

inf = open('somefile.txt','r')
lines = inf.readlines()
inf.close()
data = []
for l in lines:
    data.append(string.split(l,sep))
   
-- 
Tyler Eaves




More information about the Python-list mailing list