Using A list of regions --- wrong usage of sorted()
Hello ,
i have run into a problem when using lists in sikuli.
i have 8 regions in a list and the code is supposed to run through this list checking for a match, In this case its "img"
if the match has been found it returns 5 ,if not 10 and it is supposed to sort it .The final part would be to highlight the regions without the match .
But every time i click run the code Sikuli just disappears with no errors or any warning .Any idea whats wrong with my code ?
Code :
ListR = [(Region1)
img =Pattern(
# Sort key function
def crosscheck(img):
for x in range(0, 8):
y = ListR[x]
if y.find(img):
return 5
else:
return 10
# Main function
while exists(
sortedMatches = sorted(ListR, key=crosscheck)
ListR[
ListR[
ListR[
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask geo for more information if necessary.