[Tutor] Need help printing a pickled data

Matt D md123 at nycap.rr.com
Tue Jun 25 20:30:33 CEST 2013


On 06/25/2013 01:54 PM, Alan Gauld wrote:
> 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?
> 
Yeh nothing as in an empty file.  The file is there but there is nothing
written in it.  self.data exists.  that the problem if have is printing
what is in it so i dont know what it looks like. No error messages
currently in the terminal.


More information about the Tutor mailing list