← Back to team overview

sikuli-driver team mailing list archive

[Bug 1312239] Re: [request] sys.path should include PYTHONPATH environment variable

 

Should this be PYTHONPATH or JYTHONPATH? I would assume JYTHONPATH since
Jython itself does not use the PYTHONPATH variable. I believe this was
done because not all modules are compatible with both interpreters.

In my project I used the JYTHONPATH to specify the location of the
Jython top level packages (I do not want to mix Jython and CPython
packages since our framework uses both and neither is compatible with
the other interpreter) and sikuli is able to find them.  I confirmed
this by first opening a Jython interactive session and verifying using
help('modules') to verify my package was available. I then used a sikuli
interactive session from sikuli-script.jar to print the modules again
and they are the same.

I can open a new defect if necessary, but a related issue is the use of
a .pth file verified in the same way. When we deploy our execution lab
machines we are planning on setting the module paths via a .pth file
(one for Python and a separate one for Jython) so it can be updated
without changing the system configuration. When the file is included in
the Jython site-package folder I can create a Jython interactive session
and use help('modules') and see all of the JYTHONPATH modules, as well
as the modules in my .pth file. When I do the same through the sikuli
interactive session I am missing the files outlined in the .pth file.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1312239

Title:
  [request] sys.path should include PYTHONPATH environment variable

Status in Sikuli:
  Fix Committed

Bug description:
  available now in 1.1.0 2014-09-17+
  in sys.path at script runtime

  OS environment PYTHONPATH variable with one or more paths separated by : or ; respectively.
  -------------------------------------------------------- 
  If I want to import Python scripts without manually setting sys.path beforehand (as in an automated testing environment), I set the environment variable PYTHONPATH to where the scripts to be imported are, and sys.path will include these paths.

  But that does not happen for Sikuli scripts: os.environ["PYTHONPATH"]
  is set properly with my paths, but sys.path does not include them.

  Windows 7, 64 bit
  Sikuli 1.0.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1312239/+subscriptions


References