Get values from a text file in CSV format
I have managed to get sikuli to do what I want one time, but when I try to input a value from a text file and then loop the process for each value contained in the file, I can't even get past the first line of code, lol!
I tried searching for a solution but the closest I could find was this, but I get a SyntaxError: ("mismatched input 'in' expecting EOF", on line 1.
Here is the code I have so far, (I haven't even tried the loop yet, was trying to get the text input working first...)
My text file is basically like this:
"word1"
"word2"
"word3"
Do I need the " at the start and end of each line in the txt file, or just in Sikuli?
in Sikuli:
inp = file("path to your file")
content = inp.readlines()
for line in content:
list = eval(line)
(word) = eval(line)
<<<MY PROCESS>>>
Would I put the loop above the, in Sikuli: ? Or after it?
Any help would be very much appreciated!
Thanks, :)
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: