I have an app developed in python 2.7.2 on OS X.
I use the module shelve and seems to default to bsddb on the mac.
The program won’t run on a Windows 7 machine with ActiveState python 2.7 because the module bsddb is not present and is not in ActiveState’s package manager (pypm). ActiveState’s documentation says deprecated at v 2.6.
I guess it tries bdddb because the OS X python which created the DB defaults to bsddb.
When I delete the shelve database and run it on Windows, it happily uses some other underlying database. The Mac’s python is also happy.
So I think I should enforce the use of a non-bdsdb backend for shelve. Like the gdbm module.
But I can’t work out how to do that.
I seemed to have asked the wrong question. When building the windows exe, py2exe was not including an dbm modules (it couldn’t infer this dependency), so at runtime python in desperation tried to find the bdbm module.
this script setup.py includes a module which makes the py2exe version behave like the version run normally. It includes a dbm-clone module (I’m only storing ten simple dictionaries so the basic dumbdbm module is good enough