The gdbm module

(Optional). This module provides an interface to the GNU dbm database handler.

Example: Using the gdbm module
# File: gdbm-example-1.py

import gdbm

db = gdbm.open("gdbm", "c")
db["1"] = "call"
db["2"] = "the"
db["3"] = "next"
db["4"] = "defendant"
db.close()

db = gdbm.open("gdbm", "r")

keys = db.keys()
keys.sort()
for key in keys:
    print db[key],

call the next defendant
 

[comment on/vote for this article]

A Django site. this page was rendered by a django application in 0.01s 2008-10-13 01:01:34.096583. hosted by webfaction.