python 打印异常操作
import sqlite3
#10003[:1]{:2}{2}
db = sqlite3.connect(r'c:\imageDB.db')
cur=db.cursor();
db.commit();
try:
cur.execute('insert into cet_t values(?,?)',('title2.jpg',sqlite3.Binary('123'),))
except sqlite3.IntegrityError:
import sys
print sys.exc_info()[0],sys.exc_info()[1]
print 'fuck me!baby'