sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #54262
Re: [Question #688984]: IDE: imported helper files are not automatically reimported if changed
Question #688984 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688984
RaiMan proposed the following answer:
this is a workaround until the mentioned bugs are fixed (2.0.4)
---- in a folder:
main.py
helper.py
images (folder)
- images.py
- all imagefiles
---- this works
# this is the workaround
imagePath = makePath(getBundlePath(), "images")
if not imagePath in sys.path: sys.path.append(imagePath)
import images
reload(images)
from images import *
ImagePath.add(imagePath)
import helper
reload(helper)
from helper import *
# this would/should be sufficient
from images import *
from helper import *
print "from main"
callMe() # in helper
# all three print: image1.png: (130x31)
print Image.create(image1)
print Image.create("image1")
print Image.create("image1.png")
#this gives: [error] NameError ( name 'image2' is not defined )
#print Image.create(image2)
#this gives image2.png: (0x0)
#[error] ImagePath: find: not there: image2.png
#print Image.create("image2")
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.