Python-list Digest, Vol 2, Issue 34

Eric Wichterich eric.wichterich at gmx.de
Mon Nov 3 13:37:20 CET 2003


Hello Rob,

to delete an entry in shelve by key, just use:

         database = shelve.open(filename)
         del database[key]
         database.close()

Cheers,
Eric


Am Montag, 03.11.03 um 03:30 Uhr schrieb python-list-request at python.org:

> Von: "Rob" <talon2lm at yahoo.com>
> Datum: Mo, 3. Nov 2003  03:16:25 Europe/Berlin
> An: python-list at python.org
> Betreff: Shelve newbie??
>
>
> I have been tasked, an assignment from school, to make a usable 
> database
> using this code...my question, Where is there some good doc on how to 
> use
> Shelve? The python.org doesn't say much of anything about it. It's 
> driving
> me nutty.  I'm trying to figure out a way to delete enteries (with user
> inputting the name). Here's the code so far...Obviously it's not ready 
> for
> turn in!






More information about the Python-list mailing list