Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1/usr/bin/env python
- # this is from The Python
- # Standard Library by example
- # ISBN13: 9780321767349
- try:
- import cPickle as pickle
- except:
- import pickle
- import pprint
- from StringIO import StringIO
- import sys
- from pickle_dump_to_file_1 import SimpleObject
- filename = sys.argv[1]
- with open(filename, 'rb') as in_s:
- # Read the data
- while True:
- try:
- o = pickle.load(in_s)
- except EOFError:
- break
- else:
- print 'READ: %s (%s)' % (o.name, o.name_backwards)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement