using the stored keys.
"""
- def __init__(me, file, mode = 'r'):
+ def __init__(me, file, writep = False):
"""
Initialize a PW object from the GDBM database in FILE.
- MODE can be `r' for read-only access to the underlying database, or `w'
- for read-write access. Requests the database password from the Pixie,
+ If WRITEP is true, then allow write-access to the database; otherwise
+ allow read access only. Requests the database password from the Pixie,
which may cause interaction.
"""
## Open the database.
- me.db = _G.open(file, mode)
+ me.db = _G.open(file, writep and 'w' or 'r')
## Find out what crypto to use.
c = _C.gcciphers[me.db['cipher']]