[Tutor] Need help printing a pickled data
Alan Gauld
alan.gauld at btinternet.com
Tue Jun 25 20:51:19 CEST 2013
On 25/06/13 19:30, Matt D wrote:
>> 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.
OK, Try deleting the file and rerunning the program.
Check that the file is recreated and is still empty.
> self.data exists. that the problem if have is printing
> what is in it so i dont know what it looks like.
Try
print repr(self.data)
See if that helps.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list