class MyConnection(cx_Oracle.Connection):
def cursor(self):
return MyCursor(self)
class MyCursor(cx_Oracle.Cursor):
def execute(self, *args):
print 'execute:',args
return cx_Oracle.Cursor.execute(self, *args)
cx_Oracle.connect = MyConnection
Courtesy of Lars, how to make a debugging execute.