
May 2nd, 2003, 02:23 PM
|
|
Registered User
|
|
Join Date: Apr 2003
Location: South Africa
Posts: 9
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
shelve and cross-platform compatibility
Hello people,
I started using the shelve module and faced a brick wall when I tried to move a data file from Linux to Windows and visa-versa
Linux File:
news.dat: Berkeley DB (Hash, version 7, native byte-order)
Windows File:
file.dat: Berkeley DB 1.85 (Hash, version 2, native byte-order)
The Exception:
Code:
File "/usr/lib/python2.2/dbhash.py", line 16, in open
return bsddb.hashopen(file, flag, mode)
bsddb.error: (22, 'Invalid argument')
does anyone know of a better way to save data. I could possible just pickle a dict into a file, I just thought this way could be better/cleaner, since pickle might be slow and memory expensive on larger data.
Last edited by sadrok : May 2nd, 2003 at 02:39 PM.
|