Shelve and Linux
James Park
park6 at fas.harvard.edu
Fri Aug 6 10:12:00 EDT 1999
I'm having a bit of problem using the shelve module on linux
Here's a simple test script:
---------------------
#!/usr/bin/env python
import shelve
d = shelve.open("test.dbm", "c")
d["test"] = "haha"
d.close()
d= shelve.open("test.dbm")
print d["test"]
d.close()
-----------------------
On NT, it works fine.
on RedHat Linux 6.0 (2.2.7), it gives this error message:
Traceback (innermost last):
File "./test.py", line 11, in ?
d= shelve.open("test.dbm")
File "/usr/lib/python1.5/shelve.py", line 152, in open
return DbfilenameShelf(filename, flag)
File "/usr/lib/python1.5/shelve.py", line 142, in __init__
Shelf.__init__(self, anydbm.open(filename, flag))
File "/usr/lib/python1.5/anydbm.py", line 83, in open
raise error, "db type could not be determined"
anydbm.error: db type could not be determined
is this a problem with the way python is configured on my system or
something else?
thanks
jp
More information about the Python-list
mailing list