[1.1.0] Jython 2.7.0: using openpyxl (import errors) (Jython problem)
Attempting to use the excellent openpyxl module for working with Excel files (much more convenient than using the triumvirate of XLRD, XLWT and XLUtils). Have tried this both by putting a copy of the openpyxl directory in the LIB folder and by adding the Python SITE_PACKAGES folder to the sys.path.
In 1.01, the 'import openpyxl' statement returns:
[error] SyntaxError ( ("'import *' not allowed with 'from .'", ('C:\\Sikuli\
I understand is a Jython issue, since Jython 2.5 specifically does not allow this type of import.
So I tried 1.1, to see if stepping up to Jython 2.7 makes a difference. Apparently it does, because the import statement now returns
[error] ImportError ( No module named workbook )
So Jython 2.7 apparently does allow the 'import *' construct, and I suspect that now we're looking at a pathing issue of some sort.
I find that by adding 'lib\openpyxl' and 'lib\openpyxl\
[error] ImportError ( Workbook.sikuli has no Workbook.py )
Now this is interesting... how did the folder 'workbook' become 'workbook.sikuli'? And in any event, there is no 'Workbook.py' because the file is named 'workbook.py', though the CLASS within is named 'Workbook'.
I'm not that proficient yet with Python (much prefer Ruby for scripting) and no next to nothing about the nasty intricacies of the Java/Jython environment so any suggestions are appreciated. I guess in the meantime I'll have to go with the XL* trio of modules... or maybe just convert our spreadsheets to CSV and go that route.
ddk
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Daniel Kurtz
- Solved:
- Last query:
- Last reply: