It never fails (bsddb retirement in 2.3)

Paul Rubin http
Sat May 3 21:19:47 EDT 2003


"Martin v. Löwis" <martin at v.loewis.de> writes:
> > In my case I simply woke
> > up one morning and found that the version of Python that I was running
> > had changed from 1.5.2 to 2.2 and my script was crashing as a result.
> 
> I'm still uncertain as to why this happened. Can you run "file" on the
> old and the new database format?

Does this help?

    $ python
    Python 1.5.2 (#1, Apr  3 2002, 18:16:26)  [GCC 2.96 20000731 (Red Hat Linux 7.2 2 on linux-i386
    Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
    >>> import anydbm
    >>> anydbm.open("p1","c")
    <bsddb object at 80e7cb0>
    >>> 
    $ python2
    Python 2.2 (#1, Apr 12 2002, 15:29:57) 
    [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import anydbm
    >>> anydbm.open("p2","c")
    <bsddb.bsddb object at 0x8156360>
    >>> 
    [phr at ruckus tmp]$ ls -l p1 p2
    -rw-r--r--    1 phr      users       16384 May  3 18:17 p1
    -rw-r--r--    1 phr      users       12288 May  3 18:17 p2
    [phr at ruckus tmp]$ file p1 p2
    p1: Berkeley DB 1.85 (Hash, version 2, native byte-order)
    p2: Berkeley DB (Hash, version 7, native byte-order)
    $

Thanks.




More information about the Python-list mailing list