I want Sikuli to load some configuration such as variables values and other data from a configuration file?

Asked by Jeff Sant

I want Sikuli to load some configuration such as variables values and other data from a configuration file and update it whenever needed?

Is this possible?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

try module ConfigParser (hoping it is available with Jython 2.5.1, that comes with current Sikuli -- I am already using 2.5.2)
usage: http://www.jython.org/docs/library/configparser.html

if it is not available try module csv.

If not possible, you have to use file.read/write and implement your own parsing
http://www.jython.org/jythonbook/en/1.0/InputOutput.html#

JSON support is also available, but a bit more complicated to get it work:
http://opensource.xhaus.com/projects/show/jyson

Revision history for this message
Jeff Sant (sant-jeff) said :
#2

Thanks RaiMan, that solved my question.