Re: Is there a replement for bsddb in python3?

2016-12-09 Thread Ben Finney
clvanwall writes: > I found that bsddb module was removed from Python3.  Is there a > replacement for it? The ‘dbm’ library is what you need now, I believe https://docs.python.org/3/library/dbm.html>. dbm is a generic interface to variants of the DBM database […] There is a th

Re: Is there a replement for bsddb in python3?

2016-12-09 Thread Paul Rubin
clvanwall writes: > I found that bsddb module was removed from Python3. Is there a > replacement for it? Try "dbm" which has a few options for the underlying engine. Alternatively, try sqlite3. -- https://mail.python.org/mailman/listinfo/python-list

Is there a replement for bsddb in python3?

2016-12-09 Thread clvanwall
I have been looking for a simple indexed file database and Berkley-db was what I waa used to.  I found that bsddb module was removed from Python3.  Is there a replacement for it? John  Van Walleghen Sent from my Galaxy Tab® A -- https://mail.python.org/mailman/listinfo/python-list

70% [* SPAM *] Re: shelve trying to import bsddb

2011-02-16 Thread DPalao
El Wednesday February 16 2011, DPalao escribió: > Dear all, > I'm trying to use shelve to store some data, but sheve itself tries to > import > > bsddb, which results in: > > File "/usr/lib64/python2.6/shelve.py", line 239, in open > > > >

70% [* SPAM *] shelve trying to import bsddb

2011-02-16 Thread DPalao
Dear all, I'm trying to use shelve to store some data, but sheve itself tries to import bsddb, which results in: > File "/usr/lib64/python2.6/shelve.py", line 239, in open > return DbfilenameShelf(filename, flag, protocol, writeback) > File "/usr/lib64/pytho

Re: Python 2.6 & bsddb

2010-09-21 Thread Sridhar Ratnakumar
On 2010-09-21, at 9:04 AM, garyr wrote: > I recently installed ActivePython 2.6.6 and my programs that use anydbm or > shelve generate import errors because bsddb is missing. I installed bsddb3 > (bsddb3-5.0.0.win32-py2.6.exe) but that didn't change anything. What more do > I

Python 2.6 & bsddb

2010-09-21 Thread garyr
I recently installed ActivePython 2.6.6 and my programs that use anydbm or shelve generate import errors because bsddb is missing. I installed bsddb3 (bsddb3-5.0.0.win32-py2.6.exe) but that didn't change anything. What more do I need to do? -- http://mail.python.org/mailman/listinfo/p

Re: Temporary but named file with BSDDB

2010-06-14 Thread Jason
On Jun 14, 12:34 pm, Tim Pinkawa wrote: > On Sun, Jun 13, 2010 at 11:01 PM, Jason wrote: > The tempfile.TemporaryFile class should do the job. This part is > probably of particular interest to you: Thanks! Since the bsddb functions require a filename (not a file object), I'm

Re: Temporary but named file with BSDDB

2010-06-13 Thread Tim Pinkawa
On Sun, Jun 13, 2010 at 11:01 PM, Jason wrote: > I'd like to use the BSDDB module in an app (intended only for GNU/ > Linux like OSes). > > I don't need the on-disk file to hang around after I've used it. So as > per the docs I gave it "None" for the file

Temporary but named file with BSDDB

2010-06-13 Thread Jason
I'd like to use the BSDDB module in an app (intended only for GNU/ Linux like OSes). I don't need the on-disk file to hang around after I've used it. So as per the docs I gave it "None" for the filename. The problem is, it creates the temporary file in /var/tmp. If th

bsddb version mysmatch between win32 and linux

2010-02-13 Thread Expo
Hi guys, I found an incompatibility in the bsddb library shipped with Python which is a different version between the win32 release and the linux release. This happend using Python 2.6.2 on win32 and OpenSuse 11.2. To reproduce this problem, create a bsddb file under win32 with this code: import

Re: 3.0 - bsddb removed

2009-03-22 Thread alex23
On Mar 23, 3:30 am, Nick Craig-Wood wrote: > You would need to make a dictionary interface to sqlite, eg > >  http://code.activestate.com/recipes/576638/ > > Or do something a bit simpler yourself. Another option is to use the 'shove' module: http://pypi.python.org/pypi/shove Similar API to shel

Re: 3.0 - bsddb removed

2009-03-22 Thread Nick Craig-Wood
Sean wrote: > Anyone got any thoughts about what to use as a replacement. I need > something (like bsddb) which uses dictionary syntax to read and write an > underlying (fast!) btree or similar. sqlite. bsddb gave me no end of trouble with threads, but sqlite worked brillian

Re: 3.0 - bsddb removed

2009-03-22 Thread Benjamin Peterson
Sean att.net> writes: > > Anyone got any thoughts about what to use as a replacement. I need > something (like bsddb) which uses dictionary syntax to read and write an > underlying (fast!) btree or similar. pybsddb is just not included in the core. It's still distribu

Re: 3.0 - bsddb removed

2009-03-22 Thread Albert Hopkins
On Sun, 2009-03-22 at 15:55 +, Sean wrote: > Anyone got any thoughts about what to use as a replacement. I need > something (like bsddb) which uses dictionary syntax to read and write an > underlying (fast!) btree or similar. > gdbm -- http://mail.python.org/mailman/listinfo/python-list

3.0 - bsddb removed

2009-03-22 Thread Sean
Anyone got any thoughts about what to use as a replacement. I need something (like bsddb) which uses dictionary syntax to read and write an underlying (fast!) btree or similar. Thanks. Sean -- http://mail.python.org/mailman/listinfo/python-list

bsddb - help needed with btflags values for Python

2008-07-18 Thread sconnoll
import bsddb bsddb.btopen(file, flag='c', mode=438, btflags=0, cachesize=None, maxkeypage=None, minkeypage=None, pgsize=None, lorder=None) Can anyone help me with the values to use for btflags? I'd like to tell the database manager that I want to allow duplicate values. The

Re: about bsddb module

2008-05-04 Thread Jorge Godoy
abstraction... But you can try this (straight from Google for "sleepycat multiple databases" and sleepycat came from the docs for bsddb): http://www.nextgen6.net/docs/db4.1.25/api_java/db_open.html and pay attention to the details here: http://forums.oracle.com/forums/thread.jspa?th

Re: about bsddb module

2008-05-03 Thread cocobear
On 5月3日, 下午7时17分, cocobear <[EMAIL PROTECTED]> wrote: > How to deal with multiple databases in an file. I want to get the > content of several databases. > > it's the code I wrote: > > [EMAIL PROTECTED] ~]$ python > Python 2.5.1 (r251:54863, Oct 30 2007, 13:54:11) > [GCC 4.1.2 20070925 (Red Hat 4.1

about bsddb module

2008-05-03 Thread cocobear
t;, "credits" or "license" for more information. >>> import bsddb >>> import os >>> import time >>> >>> db_file = 'native.db' >>> db = bsddb.db.DB() >>> db.open(db_file,bsddb.db.DB_UNKNOWN,bsddb.db.DB_RDONL

Re: Can't get bsddb working on Solaris 8

2008-03-18 Thread partofthething
I fixed it! I had omitted the cascade of exceptions, but the previous one to the one shown is: File "/usr/local/lib/python2.5/dbhash.py", line 5, in import bsddb So I just went into dbhash.py and changed line 5 to import bsddb3 as bsddb. Then everything started working as planned.

Can't get bsddb working on Solaris 8

2008-03-17 Thread partofthething
I've been struggling with this all day. I am trying to get Python 2.5 running with the BerkeleyDB bindings provided by bsddb. First, I downloaded the BerkeleyDB system (version 4.5) from http://www.oracle.com/technology/products/berkeley-db/index.html. Then, I downloaded bsddb from

bsddb : python, index, cursor and get

2007-11-13 Thread Pierre
Hello, I'm having problems to use the get method on a cursor with an index (secondary database). I've read Oracle's docs but there are mainly in C, JAVA and C++. So no python docs! actually, that's what I'm trying to do : ret = cursor.get(key='blabla', data='2007-10-30', flags=0, dlen=-1, doff=

Re: bsddb in python 2.5.1

2007-11-04 Thread Martin v. Löwis
> I have two versions of bsddb3 installed (only one is active) this is > from /usr/lib/python2.5/site-packages: > drwxr-xr-x 3 root root 4096 2007-11-03 15:01 bsddb3 > -rw-r--r-- 1 root root905 2007-11-03 15:39 bsddb3-4.4.2.egg-info > -rw-r--r-- 1 root root905 2007-11-03 15:49 bsddb3-4

Re: bsddb in python 2.5.1

2007-11-04 Thread BjornT
On Nov 4, 1:04 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > I know that when you upgrade Berkeley DB you're supposed to go through > > steps solving this problem,but I wasn't expecting an upgrade. I've > > tried to use different version

Re: bsddb in python 2.5.1

2007-11-04 Thread Martin v. Löwis
> I know that when you upgrade Berkeley DB you're supposed to go through > steps solving this problem,but I wasn't expecting an upgrade. I've > tried to use different versions bsddb3, 4.4 and 4.5, (instead of bsddb > that comes with python 2.5.1) with different version

bsddb in python 2.5.1

2007-11-03 Thread BjornT
Have a rather big problem with bsddb I can't figure out. I upgraded an Ubuntu machine from 7.05 to 7.10 which upgraded python to 2.5.1 I run a local website that uses bsddb, and suddenly I get a version mismatch error with bsddb and I can't access my database anymore I noticed in

help in rnopen in bsddb?

2007-06-19 Thread Squzer
How ca i create a databse file using rnopen? How to set the key for this file? i am tried but i got error.. please can any one tell... -- http://mail.python.org/mailman/listinfo/python-list

Re: huge dictionary -> bsddb/pickle question

2007-06-15 Thread Alex Martelli
ight be enough: key, subkey, leftint, rightint -- each field of the appropriate type (you do tell us that the two ints are smallish integers, but we don't know directly about the types of the keys -- besides a hint that the main keys are presumably strings of some kind since that's what bsddb l

Re: huge dictionary -> bsddb/pickle question

2007-06-15 Thread Marc 'BlackJack' Rintsch
e, > (i.e in processing or inserting to db). But I guess its mainly because > of pickling and unpickling. > > Any suggestions will be appreciated :) I guess your guess about the pickling as bottleneck is correct but measuring/profiling will give more confidence. Maybe another database t

huge dictionary -> bsddb/pickle question

2007-06-15 Thread lazy
iving the idea. 1) Use bsddb. when an insert is done, the db will have key1 as key and the value(i.e db[key1] will be be pickleled value of dict2). after 1000 inserts , I close and open the db ,inorder to flush the contents to disk. Also when I try to insert a key, if its already present, I unp

Re: Questions about bsddb

2007-05-11 Thread sinoodle
Thanks for the suggestion, I do remember reading that, but I don't think that helped much. I found experimenting around with the different settings, that the cache size is where the problem was. I've got it set to 1.5 GB and it's pretty happy at the moment, and the reduction in build time is a fra

Re: Questions about bsddb

2007-05-09 Thread Nick Vatamaniuc
On May 9, 4:01 pm, [EMAIL PROTECTED] wrote: > Thanks for the info Nick. I plan on accessing the data in pretty much > random order, and once the database is built, it will be read only. > At this point Im not too concerned about access times, just getting > something to work. I've been messing arou

Re: Questions about bsddb

2007-05-09 Thread sinoodle
Thanks for the info Nick. I plan on accessing the data in pretty much random order, and once the database is built, it will be read only. At this point Im not too concerned about access times, just getting something to work. I've been messing around with both bt and hash with limited success, which

Re: Questions about bsddb

2007-05-09 Thread Nick Vatamaniuc
On May 9, 8:23 am, [EMAIL PROTECTED] wrote: > Hello, > > I need to build a large database that has roughly 500,000 keys, and a > variable amount of data for each key. The data for each key could > range from 100 bytes to megabytes.The data under each will grow with > time as the database is being b

Questions about bsddb

2007-05-09 Thread sinoodle
Hello, I need to build a large database that has roughly 500,000 keys, and a variable amount of data for each key. The data for each key could range from 100 bytes to megabytes.The data under each will grow with time as the database is being built. Are there some flags I should be setting when op

locking bsddb objects

2006-11-24 Thread Antoon Pardon
This is a little project using python 2.3.5, I want to use one of the bsddb objects, but I also need to protect against concurrent access and modification. IMO this would be something for fcntl.flock or fcntl.lockf. However the bsddb objects don't provide a fileno method. So how do I pr

Compiling python 2.5 on OS X 10.4.8 with bsddb support

2006-11-07 Thread Yi Qiang
Hi guys, I am trying to compile python 2.5 on my OSX machine so it includes the bsddb module. Currently, when I type 'import bsddb' I get the following traceback: /Users/yi/Software/sage-1.4.1.2/local/lib/python2.5/bsddb/__init__.py in () 49 from bsddb3.dbutils import De

Re: bsddb

2006-09-26 Thread skip
Marc> "DB_VERSION_MISMATCH: Database environment version mismatch -- Marc> Program version 4.4 doesn't match environment version 186187776.0" Marc> DBError: -30971 I haven't used bsddb much recently, but in the past I think this usually meant that the S

bsddb

2006-09-26 Thread Marc Jeurissen
Hi all, I have a small web application (Pandion) wich uses the bsddb package on Windows XP. Since Python 2.5 I get an error when accessing the database. Code snippet: from bsddb import db from Pandion.system import registry Database.__dbEnv = db.DBEnv() Database.__dbEnv.open

Re: bsddb version?

2005-10-23 Thread Peter Hansen
leasun wrote: > Anybody knows which version bsddb is released with py2.3 and py2.4? Is this what you wanted? Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 >>> import bsddb >>> bsddb.__version__ '4.3.0' I'll leave it up to yo

bsddb version?

2005-10-23 Thread leasun
Anybody knows which version bsddb is released with py2.3 and py2.4? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: bsddb environment lock failure -- resolved

2005-07-10 Thread Barry
Upgrading db4 to db4-4.1.25-14.rpm seems to have take care of this. On 7/10/05, Barry <[EMAIL PROTECTED]> wrote: > I have python2.4.1 installed on two machines: > -- one is Fedora core 1, where the bsddb module works fine > -- one is Redhat ES 3.0, and I installed mysql 4

bsddb environment lock failure

2005-07-09 Thread Barry
I have python2.4.1 installed on two machines: -- one is Fedora core 1, where the bsddb module works fine -- one is Redhat ES 3.0, and I installed mysql 4.1 (and mysql-python2.1) after putting the newer python on the machine. python2.2, which came with Redhat ES, works fine, so I suppose I messed

Re: slicing a bsddb table, eg. for rec in bsddb["AArdvark":"zebra"]: print rec

2005-06-26 Thread Bengt Richter
On Sun, 12 Jun 2005 16:49:57 -0500, Skip Montanaro <[EMAIL PROTECTED]> wrote: > >Neville> # I was expecting a slice of an index file to yield a >Neville> # generator so not all the records need to be read from disk > >Slicing is a feature of sequence types, not mapping types. > >>>

Re: slicing a bsddb table, eg. for rec in bsddb["AArdvark":"zebra"]: print rec

2005-06-12 Thread Skip Montanaro
Neville> # I was expecting a slice of an index file to yield a Neville> # generator so not all the records need to be read from disk Slicing is a feature of sequence types, not mapping types. >>> import string >>> d = dict(zip(string.lowercase, string.uppercase)) >>> d

slicing a bsddb table, eg. for rec in bsddb["AArdvark":"zebra"]: print rec

2005-06-12 Thread Neville C. Dempsey
#!/bin/env python import bsddb test=bsddb.btopen("test.tbl") for m in "JFMATQPHSOND": test[m]="Profit for month "+m+" $1B" def subyear_report(record_selection): for data in record_selection.iteritems(): print data # I was expecting a slice of an inde

possible solution for bsddb > get data results on the internet.

2005-03-15 Thread martijn
H! I have a big bsddb database created with python and that works fast. I know that I can use the python_apache module to show the data results online. //--- python_apache module //--- but my question is: Is there a faster/easy way to get the records online using a bsddb database ? with php

Re: bsddb support for berkeley db 4.3?

2005-03-13 Thread "Martin v. Löwis"
Andrew MacIntyre wrote: If you can, I'd suggest posting a bug report on SF against 2.4 to see whether you can encourage the installer builder to upgrade BSD DB - though do be certain to check what's in 2.4.1c1 first. It's 4.2.52, and I don't think I'm going to use anything else for 2.4.1. In fact

Re: bsddb support for berkeley db 4.3?

2005-03-12 Thread janeaustine50
Martin v. Löwis wrote: > [EMAIL PROTECTED] wrote: > > It doesn't seem like the python 2.4(and the recent 2.4.1) support > > berkeley db 4.3. > > What makes you say that? It builds fine for me. Oh, it doesn't work with 2.4(I tried this one) but with 2.4.1 seemingly. In the setup.py from 2.4 there

Re: bsddb support for berkeley db 4.3?

2005-03-12 Thread Andrew MacIntyre
[EMAIL PROTECTED] wrote: It doesn't seem like the python 2.4(and the recent 2.4.1) support berkeley db 4.3. (4.3 fixes some deadlock bugs I occasionally encounter using 4.2.) bsddb3(at pybsddb.sf.net) already supports 4.3 since last December(but doesn't explicitly support win32 -- see the assert st

Re: bsddb support for berkeley db 4.3?

2005-03-12 Thread "Martin v. Löwis"
[EMAIL PROTECTED] wrote: It doesn't seem like the python 2.4(and the recent 2.4.1) support berkeley db 4.3. What makes you say that? It builds fine for me. bsddb3(at pybsddb.sf.net) already supports 4.3 since last December(but doesn't explicitly support win32 -- see the assert statement in setup.p

bsddb support for berkeley db 4.3?

2005-03-12 Thread janeaustine50
It doesn't seem like the python 2.4(and the recent 2.4.1) support berkeley db 4.3. (4.3 fixes some deadlock bugs I occasionally encounter using 4.2.) bsddb3(at pybsddb.sf.net) already supports 4.3 since last December(but doesn't explicitly support win32 -- see the assert statement in setup.py). I

Re: bsddb for k, v in db.items(): do order the numbers ?

2005-03-07 Thread Ulf Göransson
] = 'nl' #same keys so it wil overwrite db["name"] = 'jan' db["age"] = '40' db["country"] = 'eng' But how does other people use bsddb then ? - with a hidden |int like below ? db["name|0"] = 'jan' db["age

Re: bsddb for k, v in db.items(): do order the numbers ?

2005-03-07 Thread martijn
; #same keys so it wil overwrite db["name"] = 'jan' db["age"] = '40' db["country"] = 'eng' But how does other people use bsddb then ? - with a hidden |int like below ? db["name|0"] = 'jan' db["age|1"] = '40

Re: bsddb for k, v in db.items(): do order the numbers ?

2005-03-02 Thread Christopher De Vries
On Wed, Mar 02, 2005 at 01:31:04PM +0300, Denis S. Otkidach wrote: > You are not right, records in BTree (btopen) are certainly sorted. For > positive integers you can pack keys with struct.pack('>I', value). You're right... I missed the btopen (rather a key thing to miss I know, but when you hav

Re: bsddb for k, v in db.items(): do order the numbers ?

2005-03-02 Thread Denis S. Otkidach
On Mon, 28 Feb 2005 11:48:44 -0500 Christopher De Vries <[EMAIL PROTECTED]> wrote: > If you want your key, value pairs in a certain order you have to sort > them yourself. Dictionaries and bsddb keys are unsorted. You are not right, records in BTree (btopen) are certainly sorted.

Re: bsddb for k, v in db.items(): do order the numbers ?

2005-03-01 Thread martijn
oyea, I must convert it to numbers ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: bsddb for k, v in db.items(): do order the numbers ?

2005-02-28 Thread Steve Holden
certain order you have to sort them yourself. Dictionaries and bsddb keys are unsorted. Remember, also, that the keys are strings, so you'll need to convert them to numbers if you want them to sort numerically - otherwise "11" will come before "2". regards Steve -- Meet the P

Re: bsddb for k, v in db.items(): do order the numbers ?

2005-02-28 Thread Christopher De Vries
-- If you want your key, value pairs in a certain order you have to sort them yourself. Dictionaries and bsddb keys are unsorted. Chris -- http://mail.python.org/mailman/listinfo/python-list

bsddb for k, v in db.items(): do order the numbers ?

2005-02-28 Thread martijn
WHen I use the code below and printing all the results i get this: -- 0 1 10 11 2 3 4 5 6 7 8 9 -- But I want -- 0 1 2 3 4 5 6 7 8 9 10 11 -- Thanks for helping import bsddb def addRow(key,val): db[key] = key print key, db = bsddb.btopen('test3.db','n

Exception from bsddb module

2005-01-30 Thread jalil
en(file, flag, mode) File "/usr/local/lib/python2.4/dbhash.py", line 16, in open return bsddb.hashopen(file, flag, mode) File "/usr/local/lib/python2.4/bsddb/__init__.py", line 285, in hashopen e = _openDBEnv() File "/usr/local/lib/python2.4/bsddb/__init__.py", lin