← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #200244]: __main__ changes after using Region.spatialOperators() (right(), below(), ...)

 

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

    Status: Answered => Solved

j confirmed that the question is solved:
The example above is just a simplified version of the code I'm actually
using.

In my script I used import sikuli.Sikuli as sikuli because I used the
importing module to wrap some Sikuli methods. E.g. like this:

module.py:

import sikuli.Sikuli as sikuli

def type(text):
    // do some special things
    return sikuli.type(text)

If I would use from sikuli.Sikuli import *, I would have two methods
with the same name:

from sikuli.Sikuli import *

def type(text)
   return type(text)

would do a recursive method call.

I only used sikuli.SCREEN.right() to demonstrate the behaviour in a
simple way, in my "real" script, I used some other previously created
Region.

I do now use the workaround you described.

This was another nice bug to find. Sikuli can surprise you every day =)

Anyway, thanks for your reply

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