Question #236949 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/236949
Status: Open => Answered
RaiMan proposed the following answer:
ok, finally understood ;-)
def getName(file):
f = open(file)
name = ""
for line in f.readlines():
if line.count("Student Name") == 0: continue
(head, name) = line.split("-")
name = name.strip()
break
f.close()
return name
file1 = "some absolute file name"
file2 = "some other absolute file name"
name1 = getName(file1)
name2 = getName(file2)
if name1 == name2:
print "we have a match:", name1, "in:" file1, "and:", file2
else:
print "different names:", name1, name2, "in:" file1, "and:", file2
--
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