Re: [Tutor] Pickle Class Instances

2011-11-01 Thread Andreas Perstinger
On 2011-11-01 06:31, Rinu Boney wrote: def add_book(b): fo=open('books.dat','wb') pickle.dump(b,fo) fo.close() The Display After Unpickling Shows only the last Class Instance. How To Display All The Data In The File ? You haven't shown us the complete program (how to you call

[Tutor] Pickle Class Instances

2011-10-31 Thread Rinu Boney
This Is My Program : class book: def __init__(self,bno=100,bname='Book'): self.book_number=bno self.book_name=bname def enter_book(self): self.book_number=input(Enter Book No : ) self.book_name=input(Enter Book Name : ) def display_book(self):