← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #562214]: Loop through CSV file and incrementing variable

 

Question #562214 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/562214

    Status: Open => Answered

RaiMan proposed the following answer:
since you are (correctly) using:
for row in csvfile:

you have to refer to row inside the loop and not data.

row is a python list, hence you access the row fields as row[n]

instead of using
data.get_col_row(1, 2)
inside the loop.

In my understanding of the csv module:

csv_input = csv.reader(open(filename))
for row in csv_input:
    print row, row[1], ...

according to:
https://docs.python.org/2/library/csv.html

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.