← Back to team overview

sikuli-driver team mailing list archive

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

 

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

    Status: Answered => Open

Ryan is still having a problem:
I'll do my best to provide what I have but some of it I cannot disclose
unfortunately.

The import part looks like this:

The entry point to Jython is a script entrypoint.py within
entrypoint.sikuli.  This script accepts a variable amount of arguments
from the commandline when running. From here we are using reflection to
determine what class/function to run based on the arguments.

The class to be run is imported as so: mod = __import__("%s.Components.%s" % (self.project, moduleName), fromlist=[moduleName]).
Essentially I am building "project.Component.Path.To.Module" and importing the module from it.

In my case this successfully begins importing Navigation.py. The failing
line from this script is from ..Frames.Pages.Login import Login


Sikuli is introduced at the top level package. In this case it is
Central/__init__.py. Central.py imports our sikuli wrapper
VertexSikuli.py. This is simply to set all configuration and provide a
very minimalist sikuli API access to reduce confusion. Sikuli is
imported in this file as import sikuli.Sikuli as _sik.

I know you promote the use of global imports but we have designed our
framework so that all objects either access sikuli functionality through
their region or through super-class functionality using the contained
region methods.

Hope this is helpful!

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