← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #631108]: .csv excel file reading Error in sikuli

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
the docs should have helped:
https://docs.python.org/2/library/csv.html

import csv
out = open('C:/Users/e592134/Desktop/New folder/example1.csv' , 'rb')
data = csv.reader(out)
for line in data:
    print(data[0])
    print(data[1])
    print(data[2])

BTW: your original code has an indent problem

   data=[row[1] for row in data]
should not have whitespace in front, since it is level 0 code

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