simple dbm question

Han Holl han.holl at pobox.com
Fri Apr 9 14:38:32 EDT 1999


> 
>    Is there GDBM database "hew"? If not - you need to create it:
> 
> import anydbm
> file = anydbm.open('hew', 'w')
> 

Actually, it should be:
   file = anydbm.open('hew', 'c')

'w' is for read/write an _existing_ database.

(Of course, for ordinary file open, you need 'w'! )

Han




More information about the Python-list mailing list