Re: bsddb185 question

2005-11-23 Thread thakadu
Martin you are great! If I had just opened the file with f=bsddb185.hashopen('filename',''w') it would have worked the first time. So now I will create wrapper classes around the file classes of bsddb185 and create the methods that I need to keep it consistent with bsddb. Another small difference

Re: bsddb185 question

2005-11-23 Thread Martin v. Löwis
thakadu wrote: > However the line: > del db[key] > results in an error: (1, 'Operation not permitted') > (only tested on Python 2.3.5) Did you open the dbm file for read-write? This should work, and is implemented. > Could this be because the .del() method of the dictionary > has not been impleme

Re: bsddb185 question

2005-11-22 Thread thakadu
Thanks Martin However the line: del db[key] results in an error: (1, 'Operation not permitted') (only tested on Python 2.3.5) Could this be because the .del() method of the dictionary has not been implemented either? In fact in my tests any attempt at altering the db by use of normal dictionary me

Re: bsddb185 question

2005-11-22 Thread Martin v. Löwis
thakadu wrote: > It seems it doesnt implement ALL of the dictionary interface though. > dir({}) yields many more methods than dir(bsddb185.open(f)). > So bsddb185 is missing many of the methods that I am used > to in bsddb. I mentioned some above that are missing, pop() > in particular would be use

Re: bsddb185 question

2005-11-22 Thread skip
thakadu> Ok but if you read my original post I already said that! Sure, I did. I was recapping what the purpose of the bsddb185 module is and why its API is not likely to change. thadaku> The issue is that I have an application that needs to share thakadu> data with an existing Ber

Re: bsddb185 question

2005-11-22 Thread thakadu
Ok but if you read my original post I already said that! The issue is that I have an application that needs to share data with an existing Berekeley db 1.85 database and applications in perl. Sure if I was creating the database myself I would use the newer bsddbmodule but I can't require the perl c

Re: bsddb185 question

2005-11-22 Thread skip
thakadu> It seems it doesnt implement ALL of the dictionary interface thakadu> though. dir({}) yields many more methods than thakadu> dir(bsddb185.open(f)). So bsddb185 is missing many of the thakadu> methods that I am used to in bsddb. I mentioned some above that thakadu> ar

Re: bsddb185 question

2005-11-22 Thread thakadu
It seems it doesnt implement ALL of the dictionary interface though. dir({}) yields many more methods than dir(bsddb185.open(f)). So bsddb185 is missing many of the methods that I am used to in bsddb. I mentioned some above that are missing, pop() in particular would be useful in my situation but t

Re: bsddb185 question

2005-11-21 Thread Martin v. Löwis
thakadu wrote: > So it seems I am forced to use the bsddb185 module > which does not have convenient record level methods. > Am I missing something here or have others eperienced > tha same? I think you are missing that bsddb185 implements the dictionary interface. So you can use [key] to access t

bsddb185 question

2005-11-21 Thread thakadu
I have an application that needs to create and delete records in a Berkeley DB version 1.85 database. If I use the bsdddb185 module I dont see any of the record manipulation methods in there that are available in the newer bsddb module. (put(), get(), pop() etc) I know the docs say that one should