Python object persistence for dictionary like object : shelve : File : Python examples (example source code) Organized by topic

C++
PHP
Python


Python  »  File   » [  shelve  ]  Screenshots 
 



Python object persistence for dictionary like object




import shelve

s = shelve.open('data')

s['key'] = range(4)

print s['key']               

s['key'].append('more')       

print s['key']                    

x = s['key']              

x.append('more')       

s['key'] = x              

print s['key']            

           
       
Related examples in the same category
1.  Find a word in shelve file
2.  Pickling and shelving data
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.