It was posted recently that pickleing should use binary mode.
See changes in code.

Rick Muller wrote:
   >
   >from cPickle import load, dump
   >
   >def save(fname,addressbook):
   >    file = open(filename,'w')

file = open(filename,'wb')

   >    dump(addressbook,file)
   >    file.close()
   >    return
   >
   >def read(fname):
   >    file = open(filename)

file = open(filename, 'rb')

   >    addressbook = load(file)
   >    file.close()
   >    return addressbook


All the best
Isr

_______________________________________________
Tutor maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to