← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #678874]: Python: with someRegion: inside with block someRegion gets what SCREEN is outside

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
I am sorry for the confusion.

After looking again into the code, I had to realize, that the support for with (__entry__, __exit__) is switched off at the Java level.
So the effects are completely caused by Jython (no where else special support for with by SikuliX).

So simply for now: we have to live with it :-(

The historical implementation of the SCREEN object (and hence the use of
undotted methods) was a nice idea for supporting scripting newbies, but
has many bad implications, that usually hit the ones like you, who want
to make reliable code.

Currently I am experimenting with py4j, that would allow to use SikuliX features directly from Python (the real one ;-) up to 3.7.
Some areas in SikuliX have to be changed so, to fully support this environment, but it is promising.

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