Mailing List Archive

Is bsddb.pyd thread safe in 1.5.2 (win95)
Bruce Dodson wrote in message ...
>I see a bsddb.pyd included with Python 1.5.1, and I assume with 1.5.2. I
>think this means Python shouldn't fall back to dumbdbm on a normal
>installation. If I am wrong about that, e.g. if bsddbm.pyd is based on the
>1.x series dbm that didn't support concurrent use, I think you can get a
>safe version of dbm from www.SleepyCat.com, or maybe the gdbm from
>www.roth.net/libs. It should be quite simple to plug in one of those to
the
>bsddbm or gdbm Python module source.


Is there any way to find out which version of dbm the 1.5.2 bsddb.pyd file
is based on? I would rather stick to using standard Python libraries if
possible for deployment purposes, but finding out whether a program is
thread-safe is a bit of a black art unless you are told in documentation
(experimentation, for example, is not really a satisfactory method!).

Also, what is a .pyd file - and should I be able to find bsddbm.pyd in my
installation (because I can't).

Cheers,

Ian.
Is bsddb.pyd thread safe in 1.5.2 (win95) [ In reply to ]
Ian Clarke wrote:
> Is there any way to find out which version of dbm the 1.5.2 bsddb.pyd file
> is based on?

Python's bsddb module uses the DB 1.* interface. You can compile it
against the DB 2.* by changing the include from:
#include <db.h>
to:
#include <db_185.h>

which implements a compatibility interface. I've been looking at the
internals of the bsddb module to have it detect which version it's using
and to handle things appropriately but don't have anything production
quality yet.

moo
----------------------------------------------------------------------
Ron Klatchko - Manager, Advanced Technology Group
UCSF Library and Center for Knowledge Management
ron@library.ucsf.edu