very large dictionary

member thudfoo thudfoo at opensuse.us
Sun Aug 3 23:48:47 CEST 2008


On 3 Aug 2008 20:40:02 GMT, Jorgen Grahn <grahn+nntp at snipabacken.se> wrote:
> On 3 Aug 2008 20:36:33 GMT, Jorgen Grahn <grahn+nntp at snipabacken.se> wrote:
>  > On Fri, 1 Aug 2008 01:05:07 -0700 (PDT), Simon Strobl <Simon.Strobl at gmail.com> wrote:
>
> ...
>
> >> If there is no other way to do it, I will have to learn how to use
>  >> databases in Python.
>  >
>  > If you use Berkeley DB ("import bsddb"), you don't have to learn much.
>  > These databases look very much like dictionaries string:string, only
>  > they are disk-backed.
>
>
> ... all of which Sean pointed out elsewhere in the thread.
>
>  Oh well. I guess pointing it out twice doesn't hurt.  bsddb has been
>  very pleasant to work with for me. I normally avoid database
>  programming like the plague.
>
>

13.4 shelve -- Python object persistence

 A ``shelf'' is a persistent, dictionary-like object. The difference
with ``dbm'' databases is that the values (not the keys!) in a shelf
can be essentially arbitrary Python objects -- anything that the
pickle module can handle. This includes most class instances,
recursive data types, and objects containing lots of shared
sub-objects. The keys are ordinary strings....

[...]



More information about the Python-list mailing list