Try to use Sikuli features in Python script using Python interpreter --- not possible --- use Jython

Asked by Philippe Dejean

Hi,
I am trying to use sikuli scripts in python scripts. But when I import sikuli (from sikuli.Sikuli import *), python answer me : no module named sikuli.Sikuli.
My question is a bit stupid but : Where is this sikuli module ?

Thanks,

Philippe

Question information

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

It is not possible, to use

from sikuli.Sikuli import *

in real Python (using e.g. Python 2.6 Interpreter).

Sikuli can only be run from Python scripts using the Jython interpreter (the Sikuli features are based on Java).

And you can only use Python modules, that are supported by the Jython Environment (currently with Sikuli it is all standard features from Python 2.5 and some ported modules - C-based Python modules cannot be used (e.g. PIL))

Come back if you need help about how to run Python scripts that want to use Sikuli features using Jython.

might be helpful: https://answers.launchpad.net/sikuli/+question/141302

Revision history for this message
Philippe Dejean (philippe-dejean) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
Philippe Dejean (philippe-dejean) said :
#3

OK Thanks.