Q: shelve ovewrites for different users

Jan Kybic Jan.Kybic at epfl.ch
Sun Feb 4 11:52:41 EST 2001


Hello,
	I am using 'shelve' with Berkeley DB to store Numerical Python
arrays using a code like:

f=shelve.open('file.dat')
f['coefs']=zeros((10,20))
f.close()

for writing and

f=shelve.open('file.dat')
c=array(f['coefs'])
f.close()

for reading. I am sharing the shelve file between two users on Unix. My
problem is that when one writes it and the second one reads it, the
shelve file shrinks and does not contain anything any longer. Anybody
has seen this behaviour? Any hints? Thanks.

Jan

-- 
-------------------------------------------------------------------------
Jan Kybic <Jan.Kybic at epfl.ch>      BIG IOA DMT EPFL Lausanne, Switzerland
       or <kybic at ieee.org>         tel. work +41 (21) 693 5142
For PGP key see my WWW page.       http://bigwww.epfl.ch/kybic



More information about the Python-list mailing list