← Back to team overview

sikuli-driver team mailing list archive

[Question #230599]: How to import Sikuli in Jython?

 

New question #230599 on Sikuli:
https://answers.launchpad.net/sikuli/+question/230599

Thanks in advance for the help. I realize there are questions addressing this, however, none of the described potential solutions helped or I misunderstood them.

I'm writing some very basic tests in Jython/Netbeans and would like to get it working but unfortunately I can't seem to get Sikuli imported properly. I've tried unzipping the sikuli-script.jar and placing it in its' own directory, I've tried using sys.path.append, I've tried from sikuli import *, and I've tried putting everything under the sun in my system PATH. None of these seem to work.

Here's a little test program:

#from sikuli import *
import sys
sys.path.append("C:\\sikuli-script\\Lib")

class Login:
   path = "path =C:\\Program Files (x86)\\Program\\prog.exe"
   program = ""
    
   def __init__(self):
      self.program = ""

   def launch(self):
      program = App.open(path);

demo = Login()
demo.launch()



Traceback (most recent call last):
  File "Test\src\test.py", line 16, in <module>
    demo.launch()
  File "Test\src\test.py", line 13, in launch
    program = App.open(path);
NameError: global name 'App' is not defined


I'm using 
Windows 7 64 bit.
JDK 1.7
Jython 2.5.3
Netbeans 7.3

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.