shelve
documentation says:
The choice of which database package will be used (such as dbm, gdbm or bsddb) depends on which interface is available.
What is that mean? How to determine which package choosen? How to strictly define which one must be choosed? What database implementation best to use?
Found it here:
http://www.gossamer-threads.com/lists/python/python/13891
import shelve
import gdbm
def gdbm_shelve(filename, flag="c"):
return shelve.Shelf(gdbm.open(filename, flag))
db = gdbm_shelve("dbfile")
ps
In linked page someone also found this somewhere, but his link is dead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With