shelve portability problem

Fredrik Lundh fredrik at pythonware.com
Thu Jul 29 14:57:53 EDT 1999


<nadim_ghaznavi at my-deja.com> wrote:
> I'm having a problem moving a Python shelve ODB from Solaris to Linux.
> Here's some sample code to demo the problem:
> ...
> I know I can work around this by using pickle and a specific DB module,
> but does anyone know how I can get it working using the shelve module?

no, but let's find out.  hang on...

...

alright.  this might work:

import shelve
import gdbm

def myopen(filename, flag="c"):
    return Shelf(gdbm.open(filename, flag))

db = myopen("odbfile")

(untested)

</F>





More information about the Python-list mailing list