Thanks to everybody involved for all the work on this library!
I have some trouble to find the right concept for these two issues:
I have a class A
defined in a.py
. Since this class requires a scripting context, it has to be in the ${OPENHAB_CONF}/automation/jsr223/
directory.
It would be great to have unit tests in a separate file and to be able to reuse this class in other files. While imports from ${OPENHAB_CONF}/automation/lib/
directory are working fine, I have not been able to make a successful import from the .../jsr223
directory, could any one point me to the right direction?
When attempting to write to a file from a jython script within the ${OPENHAB_CONF}/automation/jsr223/
directory, a Permission denied
is given:
12:54:59.477 [ERROR] [jsr223.jython.test ] - exception writing to file:
Traceback (most recent call last):
File "<script>", line 202, in writeConfig
IOError: [Errno 13] Permission denied: '/etc/openhab2/automation/etc/test.txt'
even though file permissions are set:
ls -l /etc/openhab2/automation/etc
insgesamt 16
-rw-r--r-- 1 openhab openhab 3750 Jul 2 12:46 test.txt
Probably this is a security feature, so would the use of mapdb be an appropriate way to do some short term persistence - is the JSON storage available to scripts?
Thank you in advance for any help!