← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #671266]: creating an image lib

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--1. the main script (the one, that is run) does not need
from sikuli import *

--2. when using import for the script, that contains the images,
then 
setBundlePath(".../Sikulix/someImages.sikuli") 
is not needed
… an imported script is automatically added to the imagepath

--3. a script, that only contains image references like
imageXXX = "imageWhatever.png"
does not need a 
from sikuli import *
This is only needed in imported scripts, that use SikuliX features.

Generally:
If you get the error
[error] ImportError ( No module named sikuli )
when running a script, then you have to revise your setup.
Running a script in a correctly setup SikuliX IDE will never produce such errors.
This only happens in setups, where you try to run SikuliX scripts with other means: Jython from commandline, other IDE's like NetBeans/PyDev, PyCharm.

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