eltronic at eltronic at
Sun Jan 4 00:53:54 CET 2004

On 3 Jan 2004 12:49:56 -0800 boomer4467 at (Boomer) writes:
> trying to import a .csv file(from excel) 
> into some fields on my company's
> software system(which interfaces to 
> an sql database. Each row in this
> .csv file needs to be split into smaller strings 
import csv 
#something to the efect of
data = file("book1.csv").readlines()
p = csv.parser()
for ir in data:
    fields = p.parse(ir)
    if not fields:
        # multi-line record
    print fields
    #you can take it further from here...
older than python 2.3 you have to 
download seperatly the csv module
pre compiled version are available.
just had the opertunity to use it for
the first time yesterday, worked great!
please forward all spam  to "me"<u%63e at f%74c.go%76>

The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit to sign up today!

More information about the Python-list mailing list