sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #10433
Re: [Question #196092]: How to call type(string, bases, dict) instead of type( [PSMRL], text, [modifiers] )
Question #196092 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/196092
Status: Open => Answered
RaiMan proposed the following answer:
For being new to Jython you are doing rather cool stuff ;-)
--- I'm using Sikuli t script in Jython
Not really clear what that means, but I suppose, you are making Jython scripts, that use the features of Sikuli.
In dead, the Jython type command is hidden, since using "from sikuli
import *" makes all methods of Screen (and the inherited Region) global.
one of these is the Region.type().
This is a long known bug (bug 906343).
There are shown workarounds, but in your case (needs the dynamic class
type()), the only easy way is to use the "import __builtin__" solution.
If you do not need to run Sikuli scripts (.sikuli) from within your
Jython scripts using Sikuli's script runner, you might modify or comment
out the initSikuli stuff in the Sikuli.py (unjar and rejar sikuli-
script.jar). If you do this, this means , you have to qualify all Screen
and Region methods like it has to be done, when using Java programming
with Sikuli.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.