help I'm getting delimited
alexoplocatie at gmail.com
Wed Dec 17 11:39:10 CET 2008
Due to being in a hurry I didn't paste correctly (sorry).
The intention is to put values of column 1 ("id") in the roles list,
therefore appending within the loop, to fill a session var.
The complete code is:
roles = 
inp = 'C:/temp/test.csv'
fp = open(inp, 'rb')
reader = csv.reader(fp, dialect='excel', delimiter=';')
for r in reader:
## ultimately should be something like r.id or r
## first row of csv file should be skipped because of column
msg = 'Something's wrong with the csv.reader'
The roles list isn't populated at all :(
More information about the Python-list