[Tutor] Need help printing a pickled data
Alan Gauld
alan.gauld at btinternet.com
Tue Jun 25 19:54:51 CEST 2013
On 25/06/13 17:32, Matt D wrote:
> self.data = data
> with open('mypicklelog.txt','ab') as log: # open in binary mode
> pickle.dump(self.data, log) # serialize data and write to file
>
>
> And I still get nothing.
Define 'nothing'.
Does the file exist?
Does it have anything in it?
Does self.data exist - what does it look like if you print it?
Are there any error messages?
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list