← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #250984]: How convert org.sikuli.script.Pattern in string?

 

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

    Status: Answered => Solved

gregory confirmed that the question is solved:
Yes you are right, but I made another error:


   for x in pImageMap:
            print "My map: %s" % x
            image_parse = re.search('\((.*)\)',str(x))  <---- HERE I have to set str(x) otherwise it does not work.
            for root, dirnames, filenames in os.walk(self.ImagePath):
                for filename in fnmatch.filter(filenames, '*.png'):
                    #print "filename: " + filename
                    if image_parse.group(1) == filename:
                        print "match: " + str(x) + " and " + filename
                        matches.append(os.path.join(root, filename))

you have help me a lot one more time. This is you're comment that made
me realize that error.

Thank you very much

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