← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #706020]: connection with the mysql database

 

Question #706020 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/706020

    Status: Open => Answered

RaiMan proposed the following answer:
Looking for scripting solutions with SikuliX you always have to keep in
mind, that though you are scripting in Python language (level 2.7), the
interpreter is Jython. So for features not included with SikuliX you
have to look for Jython solutions.

One of these features is sql connection/use.
To get a deeper understanding: 
https://jython.readthedocs.io/en/latest/DatabasesAndJython/

main topics:

1. have a driver jar on class path at runtime and use the IDE this way from commandline
java -cp <sql-driver>.jar;sikulix-ide....jar org.sikuli.ide.Sikulix ... parameter ...

Where to get suitable driver jars see the above mentioned information or
the net.

2. in the script import the sql wrapper:
from com.ziclix.python.sql import zxJDBC

with 2.0.5+ the import from future is no longer needed.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.