I am trying to build a Python application that connects to Oracle database and show notifications. Now loops and everything is working ok but accessing the Oracle database seems to be impossible.
I researched and found out that there are two ways to connect to Oracle via Python. If we are using native python we have to use the Oracle instant client. I want to ignore this path and use the next one. The other way is to use jython and access Oracle using the Oracle JDBC driver.
I managed to import the Oracle JDBC to jython
import sys
sys.path.append('ojdbc6.jar')
from oracle.jdbc.driver import OracleDriver
from java.sql import DriverManager
Now the problem arises when I try to import Pynotify.
import sys, pynotify
Error
[pos@IT-05 ~]$ ./r.py
Traceback (innermost last):
File "./r.py", line 3, in ?
ImportError: no module named pynotify
There is no pynotify for Jython. You'll need to use java-gnome's org.gnome.notify
.