python loop performance

2007-04-25 Thread mahdieh saeed
I use python and berkeley db for my application.(use bsddb3) Use freebsd operating system. My question is about loop that I use for my application.I use loop like this for fetch information. info=cur.get(key,DB_SET) while info: info=cur.next() If this loop fetch 1 records taking alot of

conver string to dictionary

2007-02-17 Thread mahdieh saeed
Hi I want to convert string to dictionary .what is the best solution for this ? for example string is like this: '{"SalutationID":["primarykey",8388607,0,None],"CompanyID":[0,8388607,0,"index"], "SalutationName":["",255,0,None],"isDefault":["tinyint",1,1,None]}' and I want to conv

extension programing with c

2006-12-06 Thread mahdieh saeed
Hi I want to define extention module that connect to berkeley db. I define function for connection to berkeley db with c language in one file and define other function for create extention module that can import from python. function for connection to berkeley db is like this: name=BDB.c