[Tutor] In a pickle over pickles….Python 3

Jerry Hill malaclypse2 at gmail.com
Fri Nov 18 19:16:41 CET 2011


On Fri, Nov 18, 2011 at 11:12 AM, Joe Batt <joebatt at hotmail.co.uk> wrote:

>
> pickledfile=open('///Users/joebatt/Desktop/python/pickledpuzzle5.txt','w')
>     pickle.dump(filecontents,pickledfile)
>     pickledfile.close()
>
>
A pickle is a binary object, so you'll need to open your picklefile in
binary mode:

pickledfile=open('///Users/joebatt/Desktop/python/pickledpuzzle5.txt','wb')

-- 
Jerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111118/1431abbf/attachment.html>


More information about the Tutor mailing list