bsddb for beginners?
A.Newby
deathtospam43423 at altavista.com
Tue Mar 5 02:45:20 EST 2002
I want to get into databases, but most of the tuts around seem to be over
my head.
For instance, looking through the standard Python documentation for bsddb
module, 7.12 bsddb -- Interface to Berkeley DB library, doesn't really
explain what all the syntax is for. For instance, this example ......
>>> import bsddb
>>> db = bsddb.btopen('spam.db', 'c')
>>> for i in range(10): db['%d'%i] = '%d'% (i*i)
....... obviously creates a database file which behaves a dictionary. If I
type
>>>db.keys()
... I get a complete a list of the dictionary's keys (0 - 9). But why? And
how do I store values in those keys? What does the "%" symbol mean, and
what's it used for?
So what homework do I need to do to understand this stuff?
Also, do I take it that the Berkely System comes with Python 2.2, and
therefore I don't need to download anything else? Or is bsddb merely an
interface for the Berkely System?
--
cdewin at dingoblue.net.au
More information about the Python-list
mailing list