[Tutor] Changes to dbm module/file format
Peter Otten
__peter__ at web.de
Fri Oct 16 06:50:29 EDT 2015
Alan Gauld wrote:
> Has anyone noticed a change to the DBM file format or is it an OS
> specific thing? Last time I used dbm it was on a Windoze box with
> Python 3.3 and it generated sets of 3 files for each 'database'
> created. (I think this is what it did under v2 as well?)
>
> I just used it on my Linux box in 3.4 and its only creating
> a single file. Is this a 3.4 change or a Linux/dbm feature?
>
> I can't use Python on Windows at the moment so I can't check.
> Does anyone know? I don't see anything in the module docs
> about file formats differing by OS...
dbm in Python 3 or anydbm in Python 2 have logic to find the best available
key-value store. On Windows you are more likely to end up with the last
resort dbm.dumb (dumbdbm in py2) which uses three files (.dat, .dir, and
.bak) but I don't think that's always the case.
More information about the Tutor
mailing list