importing Sikuli in Jython - Jedit IDE
Hi ,
I am using jEdit Jyhthon Interpreter plugin 1.0 ( Jython vesrion 2.5.2). I would like to import Sikuli modules such as capture, click clickall, dragdrop etc into Jyhthon script.
Could you please let me know how to achive this .
Thanks
vidya
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- vidya rajagopal
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Just put
path-to-
into the class path of Jedit.
Revision history for this message
|
#2 |
But you might get into conflicts with Sikuli's built-in Jython, if you try to use the Jython layer of Sikuli
(sikuli-
--- sikuli-
--- from sikuli import * must be in your script
If this leads to weird situations, you have to take the folder sikuli-
--- from sikuli import * must be in your script
But in all cases:
path-to-
Revision history for this message
|
#3 |
Thanks for the help .
I have updated the path . But after that what? I am new to Jython also . Can you pls give me the import syntax for this.
Thanks
Vidya
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of RaiMan
Sent: Tuesday, June 12, 2012 12:51 PM
To: Rajagopal, Vidya
Subject: Re: [Question #200162]: importing Sikuli in Jython - Jedit IDE
Your question #200162 on Sikuli changed:
https:/
Status: Open => Answered
RaiMan proposed the following answer:
Just put
path-to-
into the class path of Jedit.
--
If this answers your question, please go to the following page to let us
know that it is solved:
https:/
If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https:/
You received this question notification because you asked the question.
_______
Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy.
_______
www.accenture.com
Revision history for this message
|
#5 |
Sorry for asking dum question again .
I have Sikuli Exe and I don't find " sikuli-
So I don't undersand when you say
" If this leads to weird situations, you have to take the folder sikuli-
script.
directory of your Jython installation. then it is only"
Could you please elaborate on this as to how I can extract the file from jar?
Thanks
Vidya
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of RaiMan
Sent: Tuesday, June 12, 2012 1:01 PM
To: Rajagopal, Vidya
Subject: Re: [Question #200162]: importing Sikuli in Jython - Jedit IDE
Your question #200162 on Sikuli changed:
https:/
RaiMan posted a new comment:
But you might get into conflicts with Sikuli's built-in Jython, if you try to use the Jython layer of Sikuli
(sikuli-
--- sikuli-
--- from sikuli import * must be in your script
If this leads to weird situations, you have to take the folder sikuli-
script.
directory of your Jython installation. then it is only
--- from sikuli import * must be in your script
But in all cases:
path-to-
--
You received this question notification because you asked the question.
_______
Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy.
_______
www.accenture.com
Revision history for this message
|
#6 |
look in the docs:
http://
Though this is special for NetBeans and Eclipse, all your questions are answered somehow and you might get a better insight.
Revision history for this message
|
#7 |
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of RaiMan
Sent: Tuesday, June 12, 2012 1:26 PM I did upadte the path of sikuli script jar file path
C:\Program Files\Sikuli X\sikuli-
Now when I use " from sikuli.Sikuli import *" I get the below error . Can you let me know where I might be going wrong
-------
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "D:\Documents and Settings\
ImportError: No module named sidekick
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Program Files\Sikuli X\sikuli-
File "C:\Program Files\Sikuli X\sikuli-
java.lang.
at java.lang.
at java.lang.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at sikuli.
at sikuli.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at sikuli$
at sikuli$
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at jython.
at jython.
at jython.
at jython.
at java.lang.
java.lang.
-------
To: Rajagopal, Vidya
Subject: Re: [Question #200162]: importing Sikuli in Jython - Jedit IDE
Your question #200162 on Sikuli changed:
https:/
Status: Open => Answered
RaiMan proposed the following answer:
look in the docs:
http://
Though this is special for NetBeans and Eclipse, all your questions are
answered somehow and you might get a better insight.
--
If this answers your question, please go to the following page to let us
know that it is solved:
https:/
If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https:/
You received this question notification because you asked the question.
_______
Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy.
_______
www.accenture.com
Revision history for this message
|
#8 |
--- did upadte the path of sikuli script jar file path C:\Program Files\Sikuli X\sikuli-
This contains the Jython stuff and is exactly what might lead to problems (see comment #2).
To overcome this make a script containing:
for e in sys.path: print e
So you can see, what is in sys.path, when your script is running.
Is sikuli-script.jar in Jedit's class path?
Revision history for this message
|
#9 |
Yes I am still facing error in the import sikuli statement
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of vidya rajagopal
Sent: Tuesday, June 12, 2012 3:16 PM
To: Rajagopal, Vidya
Subject: Re: [Question #200162]: importing Sikuli in Jython - Jedit IDE
Your question #200162 on Sikuli changed:
https:/
Status: Answered => Open
You are still having a problem:
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of RaiMan
Sent: Tuesday, June 12, 2012 1:26 PM I did upadte the path of sikuli script jar file path
C:\Program Files\Sikuli X\sikuli-
Now when I use " from sikuli.Sikuli import *" I get the below error . Can you let me know where I might be going wrong
-------
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "D:\Documents and Settings\
ImportError: No module named sidekick
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Program Files\Sikuli X\sikuli-
File "C:\Program Files\Sikuli X\sikuli-
java.lang.
at java.lang.
at java.lang.
at org.python.
at org.python.
at org.python.
at
org.python.
at
org.python.
at
org.python.
at
org.python.
at org.python.
at org.python.
at org.python.
at
org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at sikuli.
script.
at sikuli.
\sikuli-
at org.python.
at org.python.
at org.python.
at
org.python.
at
org.python.
at
org.python.
Source)
at
org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at
org.python.
at org.python.
at org.python.
at org.python.
at sikuli$
script.
at sikuli$
script.
at org.python.
at org.python.
at org.python.
at
org.python.
at
org.python.
at
org.python.
Source)
at
org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at
org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at org.python.
at
org.python.
at
org.python.
at
org.python.
at
org.python.
at jython.
at jython.
at jython.
at jython.
at java.lang.
java.lang.
-------
To: Rajagopal, Vidya
Subject: Re: [Question #200162]: importing Sikuli in Jython - Jedit IDE
Your question #200162 on Sikuli changed:
https:/
Status: Open => Answered
RaiMan proposed the following answer:
look in the docs:
http://
Though this is special for NetBeans and Eclipse, all your questions are
answered somehow and you might get a better insight.
--
If this answers your question, please go to the following page to let us
know that it is solved:
https:/
If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https:/
You received this question notification because you asked the question.
_______
Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy.
_______
www.accenture.com
--
You received this question notification because you asked the question.
Revision history for this message
|
#11 |
When I run the script what you gave I have the following result
>>> import sys
>>> for e in sys.path: print e
...
C:\Program Files\Sikuli X\sikuli-
C:\jython2.5.2\Lib
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of RaiMan
Sent: Tuesday, June 12, 2012 3:46 PM
To: Rajagopal, Vidya
Subject: Re: [Question #200162]: importing Sikuli in Jython - Jedit IDE
Your question #200162 on Sikuli changed:
https:/
Status: Open => Needs information
RaiMan requested more information:
--- did upadte the path of sikuli script jar file path C:\Program Files\Sikuli X\sikuli-
This contains the Jython stuff and is exactly what might lead to problems (see comment #2).
To overcome this make a script containing:
for e in sys.path: print e
So you can see, what is in sys.path, when your script is running.
Is sikuli-script.jar in Jedit's class path?
--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https:/
You received this question notification because you asked the question.
_______
Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy.
_______
www.accenture.com
Revision history for this message
|
#12 |
Ok, this means, that the Jython stuff will be taken from the Sikuli package.
If this is not what you want, you have to change the sequence somehow.
--- java.lang.
the above error might caused by the fact, that Sikuli is not able to locate the OpenCV library stuff, that is in the folder
C:\Program Files\Sikuli X\libs
This folder has to be in the system path at runtime.
Additionally if you need the interactive capture: ...Java\jre6\bin
Revision history for this message
|
#13 |
It works now . Here is details of the step for interfacing Sikuli to Jython in Jedit IDE
1. Install Sikuli for window : Run Sikuli.exe from http://
2. After installation using 7Zip or any unzip format extract the “sikuli-script.jar” file to get “Lib” folder or using Jar utility of Java
3. In the Jedit , go to Plugin and select JythonInterpreter , this will opne the IDe for Jython
4. In the Jython editor go to “Edit Jython Path” and update the path for Sikuli and Jython reference
as C:\Program Files\Sikuli X\Lib\
5. Now in the edtor use the following statement "from sikuli.Sikuli import *"
6. you can check the sucessful import by using the statement ---- input(msg=”Test”)