Two python database questions

Dan Stromberg strombrg at dcs.nac.uci.edu
Sat Oct 15 23:57:07 EDT 2005


Hi folks.

I'm working on some file indexing software, in python of course.

Over the course of working on it, I've come upon two python+database
related questions:

1) Is there a reason for the gdbm module in python 2.4.1 not to have a get
method?  This makes it a touch less dictionary-like.

2) Has anyone already written some sort of in-memory cache wrapper for
gdbm or anydbm or whatever?  As I'm writing this program, I'm finding that
there's an awful lot of disk I/O going on - it'd be great if there were
some way of keeping the n most recently used items in memory, and only
write them to disk when room needs to be made in the cache or when the
program exits?

Thanks!




More information about the Python-list mailing list