[Tutor] Reading List from File
monjissvel at googlemail.com
Thu Jul 31 18:15:48 CEST 2008
Emile is right, in python you can do most of the stuff yourself by hand
coding it, or you can use pre-made bullet proof and ready to go modules,
here you can go for the csv module that comes part of the standard library.
myfile = open('file', 'r') # open file for reading
data = csv.Reader(myfile, delimeter = ',') # let csv module load it
2008/7/31 Emile van Sebille <emile at fenx.com>
> S Python wrote:
>> Hi Everyone,
>> I am trying to read a comma-delimitted list ("aaa","bbb","ccc")
> In this case, the standard library provides csv for parsing comma separated
> files. It's not the same as rolling your own, but it is made specifically
> for this use case...
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor