The gdbm Module

(Optional) The gdbm module provides an interface to the GNU dbm database handler, as Example 10-8 shows.

Example 10-8. Using the gdbm Module


import gdbm

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

db ="gdbm", "r")

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

call the next defendant

Core Modules

More Standard Modules

Threads and Processes

Data Representation

File Formats

Mail and News Message Processing

Network Protocols


Multimedia Modules

Data Storage

Tools and Utilities

Platform-Specific Modules

Implementation Support Modules

Other Modules

Python Standard Library
Python Standard Library (Nutshell Handbooks) with
ISBN: 0596000960
EAN: 2147483647
Year: 2000
Pages: 252
Authors: Fredrik Lundh © 2008-2020.
If you may any questions please contact us: