[Tutor] extracting a cPickle/pickle file from inside a zip file

Alan Gauld alan.gauld at btinternet.com
Fri Aug 29 13:31:06 CEST 2014


On 29/08/14 10:00, diliup gabadamudalige wrote:

> pload = cPickle.load(zf.open("my.py",pwd=password))
> this gives an EOF
>
> . Does any body know why?

I've never used zipfile so I don't know, but could it be
related to the fact that your pickle file is binary?
Do you need any flags to tell zipfile that you're
extracting a binary file?

Just a thought,

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



More information about the Tutor mailing list