← Back to team overview

sikuli-driver team mailing list archive

[Question #270538]: Is there a way to remove the sikuli import feature in the nightly build?

 

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

I downloaded the nightly build to check some of the fixes out. After getting it configured I am running into the exception: ImportError: Login.sikuli has no Login.py. I believe it is because our project is not structured using the *.sikuli format. Is there a way to disable this in the importer? This has been working in the previous version for me.

With the ability to use Sikuli in an IDE it appears there is now a conflicting requirement. Python projects should be structured using packages and an __init__.py folder. When Eclipse is chosen as an IDE the *.sikuli syntax causes file structure issues. Upon refresh (or running the script maybe, I forget which) the "folder.sikuli" becomes a package structure where "folder" is a package and "sikuli" is a sub-package. This causes all kinds of problems and none of the files can be found anymore.  Also, when using multiple .py files I found the need to add every .sikuli folder to the pythonpath (and/or in Eclipse itself - it was causing all kinds of problems) and the solution was to structure the project in a series of packages like Java.

All of the image files are accessible via the following:

curDir = os.path.dirname(os.path.realpath(__file__))
image = os.path.join(curDir, "image.png")

This also allows subclasses and other code to override the image file or curDir to re-use scripts.

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