How can i store pickle dumps data ?

2007-10-20 Thread Abandoned
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

Re: How can i store pickle dumps data ?

2007-10-20 Thread Diez B. Roggisch
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()

Re: How can i store pickle dumps data ?

2007-10-20 Thread Abandoned
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)