← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #265660]: My imports stopped working when I moved to newest version (sys.path issue?)

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
as mentioned in comment #2:
with Jython use JYTHONPATH instead of PYTHONPATH, since per convention PYTHONPATH is not recognised by Jython, to avoid clashes on systems having both Python and Jython.

... and to have the relevant info from the related bug also here:

current state for version 1.1.0:
- PYTHONPATH is ignored
- JYTHONPATH is used if specified and overwrites -Dpython.path which is used if present

still to finally check, but should work
- .pth files should be recognised as well (if in JYTHONPATH/site-packages or other folders according to the rules)

in any case:
import org.sikuli.script.SikulixForJython
(or deprecated: import org.sikuli.basics.SikulixForJython)
takes care, that sikulixapi.jar/Lib gets sys.path[0]

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