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
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
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
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
> >
> >
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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=
> 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
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
> 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Anybody knows which version bsddb is released with py2.3 and py2.4?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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.
>
>>>
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
#!/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
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
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
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
[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
[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
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
] = '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
;
#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
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
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.
oyea, I must convert it to numbers ;)
--
http://mail.python.org/mailman/listinfo/python-list
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
--
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
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
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
62 matches
Mail list logo