Can I use Sikuli as an Jython library in my project?
Sikuli is really cool, but it's working in its buildin Jython environment, the Sikuli IDE.
So I m wondering is it possible to import Sikuli as an external library to my Jython library? I saw from Sikuli's website that they have this Python module which provides all Sikuli actions like click and type. Here is the link: http://sikuli.org/documentation开发者_开发百科.shtml#doc/pythondoc-python.edu.mit.csail.uid.Sikuli.html
I have tried importing the skiuli-script.jar and add the skiuli-script/Lib to the PYTHONPATH. Then in my spike.py script, I try to do this:
import python.edu.mit.csail.uid.Sikuli
capture() #enter to screen capture mode
then when execute the script, I got this error:
java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /eclipse_3.4.2/workspace/Jython/src/tmplib/libVDictProxy.jnilib: no suitable image found. Did find: /eclipse_3.4.2/workspace/Jython/src/tmplib/libVDictProxy.jnilib: no matching architecture in universal wrapper
I m using Jython 2.2.1 and Mac 10.6.2 (32-bit mode). I have also set to use 32-bit mode first in Java Preference.
I tested it with jython 2.5.1 on win32:
I have to include the win32 dir in the PATH
on your mac installation you have to add the templib Directory to your path
see the sikuli-script.sh
sikuliscript is build to run with jython 2.5.x.
a 2.5 jython is included in the sikuli-script.jar
the test-script :
import python.edu.mit.csail.uid.Sikuli as Sikuli
Sikuli.capture() #enter to screen capture mode
putting it all together i think the answer is :
YES
精彩评论