← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #695145]: addImagePath after runScript()

 

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

    Status: Open => Answered

Ben proposed the following answer:
If I understand correctly, you want to create a separate function
AutoImportPath that will be called from other script, the main goal of
the function is to set the ImagePath = to the directory of the calling
script.

def AutoImportPath(path):
    addImagePath(path)

That you can call from another script, where path = __file__

__file__ should return the path with the name of the script.

Haven't tested to.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.