← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #689767]: addHotkey cannot coerce 3rd argument to HotkeyListener

 

Question #689767 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/689767

    Status: Open => Answered

RaiMan proposed the following answer:
tested on my Windows 10 - works.

I have a Jython 2.7.1 installed at c:\jython2.7.1

I use the following command script to run Jython:

set jython=c:\jython2.7.1\bin\jython.exe
set CLASSPATH=C:\SXRun\_Latest\2_0_4\sikulixide-2.0.4.jar
%jython% %*

Using the script without parameters opens the interactive Jython prompt.

Running this script (<some-folder>\test.py):

import org.sikuli.script.SikulixForJython
from sikuli import *
for e in sys.path: print e

runs as expected without any errors and prints:

C:\Users\rmhde\AppData\Roaming\Sikulix\Lib\site-packages
C:\Users\rmhde\AppData\Roaming\Sikulix\Lib
C:\Users\rmhde
C:\jython2.7.1\Lib
__classpath__
__pyclasspath__/
C:\jython2.7.1\Lib\site-packages

The first import takes care, that the folder <app-data>\Lib  is on sys.path.
The second import initializes the API.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.