Oops formatting got mucked up. Should be def pickledobjects(f): try: while True: yield pickle.load(f) except EOFError: pass objs = list(pickledobjects(file("fi"))) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/bangpypers/attachments/20091007/6aa5e732/attachment.htm>