============================================================== SQLITE3 Function def get_db(): def dict_factory(cursor, row): d = {} for idx, col in enumerate(cursor.description): d[col[0]] = row[idx] return d db = getattr(g, '_database', None) if db is None: db = g._database = sqlite3.connect(DATABASE) db.row_factory = dict_factory return db ================================================================ I try this form but isnt ok . Can I help me ? import cx_Oracle con = cx_Oracle.connect('xxxx/xxxx at xxxxxxx/xxxxxxx') cur = con.cursor() cur.execute("select * from test") desc = [d[0] for d in cur.description] result = [dict(zip(dec,line))for line in cur] print (result) cur.close() -- Carlos EugĂȘnio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171030/186f4f41/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4