これが私のコードです。タプルのリストではなく、辞書のリストとして返されるクエリの結果を取得する方法を見つけたいと思います。cx_oracle は、「バインディング」について説明しているドキュメントの一部でこれをサポートしているようです。私はそれがどのように機能するのか理解できませんが。
def connect():
dsn = cx_Oracle.makedsn("host", 1521, "sid")
orcl = cx_Oracle.connect('scott/tiger@' + dsn)
curs = orcl.cursor()
sql = "select * from sometable"
curs.execute(sql)
result = curs.fetchall()
for row in result:
print row[13] #CATEGORY field order
print row['CATEGORY'] # <- I want this to work ('CATEGORY' is the name of a field in the 'sometable' table)
curs.close()