despite the dictionary-like interfacedbm files really do map to one or more external files for instancethe underlying default dbm interface used by python on windows writes two files--movie dir and movie dat--when dbm file called movie is madeand saves movie bak on later opens if your python has access to different underlying keyed-file interfacedifferent external files might show up on your computer technicallythe module dbm is really an interface to whatever dbm-like filesystem you have available in your pythonwhen opening an already existing dbm filedbm tries to determine the system that created it with the dbm whichdb function instead this determination is based upon the content of the database itself when creating new filedbm today tries set of keyed-file interface modules in fixed order according to its documentationit attempts to import the interfaces dbm bsddbm gnudbm ndbmor dbm dumband uses the first that succeeds pythons without any of these automatically fall back on an all-python and always-present implementation called dbm dumbwhich is not really "dumb,or coursebut may not be as fast or robust as other options future pythons are free to change this selection orderand may even add additional alternatives to it you normally don' need to care about any of thisthoughunless you delete any of the files your dbm createsor transfer them between machines with different configurations--if you need to care about the portability of your dbm files (and as we'll see laterby proxythat of your shelve files)you should configure machines such that all have the same dbm interface installed or rely upon the dumb fallback for examplethe berkeley db package ( bsddbused by dbm bsd is widely available and portable note that dbm files may or may not need to be explicitly closedper the last entry in table - some dbm files don' require close callbut some depend on it to flush changes out to disk on such systemsyour file may be corrupted if you omit the close call unfortunatelythe default dbm in some older windows pythonsdbhash ( bsddb)is one of the dbm systems that requires close call to avoid data loss as rule of thumbalways close your dbm files explicitly after making changes and before your program exits to avoid potential problemsit' essential "commitoperation for these files this rule extends by proxy to shelvesa topic we'll meet later in this databases and persistence