sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #04643
Re: [Question #168166]: script failing when put in a library
Question #168166 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/168166
Status: Open => Answered
RaiMan proposed the following answer:
--- you say: I've a new main script which read the library and then do a call to myscript().
Since I have no idea how you do that, you should read the docs at: http://sikuli.org/docx/globals.html#importing-other-sikuli-scripts-reuse-code-and-images and http://sikuli.org/docx/globals.html#general-settings-and-access-to-environment-information
May be, that you have to rethink/rewrite your approach. come back if
problems are still there.
Based on the above mentioned techniques, you can decide to have one
central images.sikuki, that contains all images in the form:
img1 = "some-image.png"
so you might use
from images.sikuli import * # left out sys.path here
and you can use either
find(img1)
or
find("some-image.png")
together with some naming conventions.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.