Hi..
I have some dictionary as {2:3, 4:6, 5:7.}
I want to pickle to these dictionary and save to database but i
couldn't..
My code for adding..
a=eval(dict)
a=pickle.dumps(a, -1)
cursor2.execute(INSERT INTO cache VALUES ('%s', %s), (x[0],a))
conn2.commit()
i try in UTF-8 postresql
Abandoned schrieb:
Hi..
I have some dictionary as {2:3, 4:6, 5:7.}
I want to pickle to these dictionary and save to database but i
couldn't..
My code for adding..
a=eval(dict)
a=pickle.dumps(a, -1)
cursor2.execute(INSERT INTO cache VALUES ('%s', %s), (x[0],a))
conn2.commit()
On Oct 20, 5:32 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Abandoned schrieb:
Hi..
I have some dictionary as {2:3, 4:6, 5:7.}
I want to pickle to these dictionary and save to database but i
couldn't..
My code for adding..
a=eval(dict)
a=pickle.dumps(a, -1)