Name
whichdb
Synopsis
whichdb(filename
)
Opens the file specified by filename
and
determines which DBM-like package created the file.
whichdb
returns None
if the
file does not exist or cannot be opened and read.
whichdb
returns '' if the file
exists and can be opened and read, but it cannot be determined which
DBM-like package created the file (i.e., the file is not a DBM file).
whichdb
returns a string naming a module, such as
'dbm
', 'dumbdbm
', or
'dbhash
', if it can determine which module can
read the DBM-like file named by filename
.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.