[HowTo] edit, run, debug Sikuli scripts in Eclipse/Netbeans

Asked by RaiMan

tested and running:
Windows 7: Eclipse Helios Classic with PyDev plugIn
Mac 10.6: Netbeans with Python plugIn

I guess it will work vice versa.

In both environments it is possible, to edit, run and debug Sikuli scripts using the relevant Python plugin running the Jython interpreter.

What is missing:
- no support for capturing images (solution: image library managed with Sikuli IDE and imported to the script)
- making a .skl ("solution": make a folder myScript.sikuli, put your myScript.py inside and zip the folder as a .skl)

In both cases it is necessary, to put a reference to the sikuli-script.jar in the relevant external library lists of the plugIn's. additionally you have to extract the folder sikuli-script.jar/Lib/sikuli and put it somewhere. You need also a reference to this folder in the Python-path - I did not manage to tell the environments, that it is inside of the .jar.

In Windows/Eclipse, the IDE shows the methods of e.g. Screen/Region/Location ... as "variable undefined", but at runtime everything works fine.

Special on Mac:
To not have the need, to install OpenCV myself (I tried, but it is a hard job on 10.6 to get it work with Sikuli), I used the modules, that come with Sikuli (Sikuli-IDE.app/Contents/Frameworks), but I had to change their dynamic link references with a modified version of the contained script. I will document this later.

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

In the script itself, you have to write

from Sikuli import *

before the first Sikuli feature usage.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.