Help: using msvcrt for file locking

Ignacio Vazquez-Abrams ignacio at openservices.net
Sun Aug 26 16:30:20 EDT 2001


On Sun, 26 Aug 2001, Sheila King wrote:

> Notice that you can append an optional 'l' to the mode, if your
> installation supports locking.
>
> Here is an interactive session:
>
> Python 2.1.1 (#6, Aug 16 2001, 17:02:08)
> [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> import dbhash
> >>> db = dbhash.open('rec', 'rl')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/big/dom/xthinkspot/lib/python2.1/dbhash.py", line 16, in open
>     return bsddb.hashopen(file, flag, mode)
> bsddb.error: locking not supported on this platform
> >>>
>
> --
> Sheila King
> http://www.thinkspot.net/sheila/
> http://www.k12groups.org/

Hmmm...

The only thing I can think of is to get a copy of libdb.dll 3.3.1 from
somewhere (I checked Google and couldn't find it, and I left my copy of
VC++ 6.0 in my other pants...), put it in your local directory, and try again.
DLLs, like Python modules, check the current directory before trying the other
standard directories.

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list