How to import MySQLdb in Sikuli? --- not possible, Python C-based module

Asked by Nassim Bahari

Hi,
I have installed Sikuli X 1.0rc3 and Python3.2 and mysql-connector-odbc-5.1.9-win32.ms on my virtual machine. I can import MySQLdb in python this way and make queries successfully.

However, when I write

import MySQLdb

in SikuliIDE, I become the error:

 ImportError:No module named MySQL db

Can anybody help please?
Thak you in advance

Question information

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

In Sikuli scripts (it is only Python language, but the interpreter used is Jython (a python interpreter based son Java)).

In the consequence, you can only import Python modules, that are totally written in Python language. No Python-C modules and Python modules containing any C-based coding.

To access MySQL from a Sikuli script: http://jythonpodcast.hostjava.net/jythonbook/en/1.0/DatabasesAndJython.html

Can you help with this problem?

Provide an answer of your own, or ask Nassim Bahari for more information if necessary.

To post a message you must log in.