Advertisement
rfmonk

shelve_existing.py

Jan 29th, 2014
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. import shelve
  2. from contextlib import closing
  3.  
  4. with closing(shelve.open('test_shelf.db')) as s:
  5.     existing = s['key1']
  6.  
  7. print existing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement