sikuli with java or sikuli with python

Asked by manas

I am bit confuse with programming language I can use with sikuli as I know sikuli support both java and python.when can I write automation program with java or python using sikuli?what is the difference between writing program with java or python.thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Aravind
Solved:
Last query:
Last reply:
Revision history for this message
Best Aravind (a4aravind) said :
#1

Hi,

Sikuli script is a Jython script. You can have both Python and Java(not pure Java though, it's Java adapted to run on Jython environment) in your Sikuli script. In SikuliX 1.01, you'll have Jython doing the interpreter role (Jython comes bundled with Sikuli X 1.0.1)
Jython - "Java coded to adapt to Python environment, plus the normal Python features and functionalities". The Jython file will have a .py format, which means it's a Python file but supports Java as well.

To choose which language to select for coding in Sikuli: if you are new to both the languages, I recommend Python rather than Java because you can avoid the overhead of converting pure Java to a Jython flavour(since you cannot use Java syntax directly in your Sikuli script)

Moreover, don't under-estimate any of these languages comparing one another, since you may be able to use a Java functionality which Python fails to do or vice versa.

Hope it's clear.

-Aravind

Revision history for this message
manas (mandalmanas786) said :
#2

Thanks Aravind, that solved my question.