← Back to team overview

sikuli-driver team mailing list archive

[Bug 1312239] Re: [request] sys.path should include PYTHONPATH environment variable (or JYTHONPATH if available)

 

No problem.  I will create a simple test scenario below showing the
issue and attach a zip with the docs.

(assuming windows)
1. Move "aModuleBeginningWithA.py" to c:\newMod
2. Place addMod.pth to the Lib/site-package directory
3. Create an interactive Jython session and use the command help('modules')
3.  --aModuleBeginningWithA.py should be one of the first modules listed (mine was after the modules beginning with "_")
4.  Create an interactive sikuli  session( I used "java -jar sikuli-script.jar -I" in the sikuli folder to replicate our automation)
5.  Use the command help('modules')
5.  --Verify that aModuleBeginningWithA is one of the first modules (Mine was after the modules beginning with "_")


I have some supporting documentation for the .pth file behavior:
https://docs.python.org/2/library/site.html


** Attachment added: "Files to replicate .pth issue I am having"
   https://bugs.launchpad.net/sikuli/+bug/1312239/+attachment/4371806/+files/pthFileTest.zip

-- 
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 (or
  JYTHONPATH if available)

Status in Sikuli:
  Fix Committed

Bug description:
  back to work:
  - should be JYTHONPATH if specified
  - .pth files should be recognised as well

  ------------------------

  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