[Tutor] (no subject)

Alan G alan.gauld at freenet.co.uk
Thu Aug 25 19:20:59 CEST 2005

I've not used pickle so don;t know if this is relevant but...

> output = codecs.open(".\\"+self.filename, "ab")
> cPickle.dump(self.terms, output)

> inFile = codecs.open(".\\"+self.filename, "r")
> cPickle.load(self.terms, inFile)

I notice you wrote in binary mode but are reading in text mode.

Does binary reading make a difference?


Alan G.

PS. Anyone else notice how some topics seem to come up in bunches. 
We haven't had any questions involving binary files for months and 
this last week we've had at least 3!

More information about the Tutor mailing list