← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #233667]: xlrd open workbook module not found

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--1. xlrd 0.9 definitely does not work with Sikuli (neither RC3 (Jython
2.5.2) nor version 1.0.1 (Jython 2.5.4), since it contains features of
Python language level 2.5+ (BTW: this is mentioned on the download page)

--2. xlrd 0.7.9 definitely works

-3. how to easily use it with Sikuli:
- download the only needed stuff (I have extracted it for you) as zip from:
https://dl.dropboxusercontent.com/u/42895525/xlrd.zip
- unzip - this will make the needed folder xldd (which also contains docs and examples)
- make sure you have a folder C:\Program Files (x86)\Sikuli X\Lib
- copy the folder xlrd to C:\Program Files (x86)\Sikuli X\Lib

It does not make sense to pollute your system path additionally with python or Sikuli related path's: Jython does not look into system path at all.
The folder Lib you created is a standard folder, known by the running Sikuli Jython 
(as you can see by using 
for e in sys.path: print e
at the beginning or only line in a Sikuli script)

I tested this and it works.

--4. filenames in Windows ...
... containing backslashes must handled specially

- double the backslashes
- use raw string r"path with backslashes"
- or use forward slashes instead of backslashes

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