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

    Status: Open => Answered

RaiMan proposed the following answer:
Sorry, my fault - this should work:

open() should use the long fileName (absolute path).

import os
dir = "D:/Documents and Settings/user/Desktop/files"
for e in os.listdir(dir): # this starts the loop
    fileName = os.path.join(dir, e)
    print fileName
    f = open(fileName)
    # some operations on file f
    click(png)
    click(png)
    f.close()
print "all files read" # this prints after the loop ends.

Mind the indentation (your clicks had no indentation though they belong
to the loop (see faq 1800)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to