[Tutor] general basic question

Alan Gauld alan.gauld at btinternet.com
Wed Feb 8 23:20:53 CET 2012


On 08/02/12 21:28, ken brockman wrote:

> Really close to it Robert. No delete but an error msg. Something akin to
> file dosen't exist, not found , or words to that effect .

Without sight of code it's only a guess but are you creating
the file with the 'wb' mode - ie. write binary? :-

myPickleFile = open("somefilename.dat", "wb")

If you are not using the 'b' for binary pickle and shelve
tend to run into problems, this might be one of those cases.
Its not glaringly obvious from the docs that you need to use
binary mode and beginners often get caught out. Could that be it?

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list