我可以在我的项目中使用 Sikuli 作为 Jython 库吗?

发布于 2024-08-21 17:10:06 字数 978 浏览 2 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笙痞 2024-08-28 17:10:06

我在 win32 上使用 jython 2.5.1 对其进行了测试:

我必须在

mac 安装的 PATH 中包含 win32 目录,您必须将 templib 目录添加到您的路径中,

查看 sikuli-script.sh

sikuliscript 构建为与 jython 2.5 一起运行.x。

sikuli-script.jar 中包含 2.5 jython

测试脚本:

import python.edu.mit.csail.uid.Sikuli as Sikuli

Sikuli.capture() #enter to screen capture mode

将它们放在一起我认为答案是:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文