Berkeley DB and Python version.

Corrado Gioannini gioco at nekhem.com
Thu Feb 6 05:22:35 EST 2003


Short question:
How can i build a Berkeley DB hash file version 5 with Python 2.1?

Long question:
I'm using Apache's rewrite maps in dbm format, and i'm running Apache
1.3.26. It seems that (this version of) Apache recognizes correctly dbm
files only if they are of version 5 (maybe I'm wrong but I tried different
other formats unsuccessfully).
I would like to be able to manage the dbm map with my beloved Python, but:
if I use the dbhash module of Python 1.5 it builds a 'good' hash file
(version 5), wich works well as a map file for Apache url rewriting engine.
Using the dbhash module of Python 2.1 (currently installed and widely used
on that machine) it builds a version 7 hash file, which doesn't work as a
dbm rewrite map.
Now, given that I do not want to upgrade Apache, i was wandering if i could 
somewhat build a version 5 Berkeley db file using Python 2.1.
In the docs of the dbhash module (or other dbm db modules) I found nothing 
about Berkeley db versions or retro-compatibility.
Any hints and suggestions would be very appreciated.

Tnx.
Corrado.
-- 
                       Thought is only a flash between two long nights,
                                          but this flash is everything.
                                                          (H. Poincaré)







More information about the Python-list mailing list