我可以在我的项目中使用 Sikuli 作为 Jython 库吗?
Sikuli 确实很酷,但它在其内置 Jython 环境 Sikuli IDE 中工作。
所以我想知道是否可以将 Sikuli 作为外部库导入到我的 Jython 库中?我从 Sikuli 的网站上看到他们有这个 Python 模块,它提供了所有 Sikuli 操作,例如单击和键入。这是链接: http:// /sikuli.org/documentation.shtml#doc/pythondoc-python.edu.mit.csail.uid.Sikuli.html
我尝试导入skiuli-script.jar并将skiuli-script/Lib添加到Python路径。然后在我的 spin.py 脚本中,我尝试这样做:
import python.edu.mit.csail.uid.Sikuli
capture() #enter to screen capture mode
然后在执行脚本时,我收到此错误:
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
我正在使用 Jython 2.2.1 和 Mac 10.6.2(32 位模式)。我还在Java首选项中设置为首先使用32位模式。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 win32 上使用 jython 2.5.1 对其进行了测试:
我必须在
mac 安装的 PATH 中包含 win32 目录,您必须将 templib 目录添加到您的路径中,
查看 sikuli-script.sh
sikuliscript 构建为与 jython 2.5 一起运行.x。
sikuli-script.jar 中包含 2.5 jython
测试脚本:
将它们放在一起我认为答案是:
是
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 :
putting it all together i think the answer is :
YES