← Back to team overview

sikuli-driver team mailing list archive

[Question #171616]: How to append common string into an array

 

New question #171616 on Sikuli:
https://answers.launchpad.net/sikuli/+question/171616

Hi,


images=("C:\images\icon1.png","C:\images\icon2.png","C:\images\icon3.png")
icon = ["Setting","Schedule","Vacation","Weather"]
for img in images:
    
    if exists(img,0): print "exists"
    else: print "not found


This is my code, its working fine, but in the images array. "C:\images\" is common in all the path
So how can i take it out as a common string and append it , while processing
for eg: something like this
   images = ("icon1.png",icon2.png",icon3.png")
   menuicon  = "C:\images\" + images
Because if there is a change in the imagepath, it will needed to change only in one place.



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