Related to Shelve Module
tarundevnani at gmail.com
Mon Apr 28 07:08:31 CEST 2008
I want to store the class instance object variables persistenlty in one file
so that other file can also access for some filtering. I tired doing this
using the shelve module.
filename = 'test.db'
d = shelve.open(filename)
a = A()
d['1'] = a
<__main__.A instance at 0x018B56C0>
<__main__.A instance at 0x018B5760>
I expect both the print statements to return the same value, The second
print statement just reads the dictonary, but still the adress (0x..) is
different from the first print statement. Can anyone tell me why. Also let
me know if you the way of getting same value both the times.
Quick help will be appreciated.
Thanks & Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list