pickle question
Stephen Boulet
stephen at theboulets.net
Sun Dec 9 23:20:28 EST 2001
Here's some sample code:
from cPickle import dump
f = open('myFile.pickle, 'wb')
dump(sParams, f, 1)
f.close()
Note the 1 option in the dump command.
Also, you'll want the 'rb' option for reading the file before you use
pickle's load function.
-- Stephen
Uwe Schmitt wrote:
> Oleg Broytmann <phd at phd.pp.ru> wrote:
> | On Thu, Dec 06, 2001 at 12:40:06PM +0000, Uwe Schmitt wrote:
> |> I pickled some data on my local unix machine. When I try
> |> to read this data on a windows machine, nothing is pickled
> |> at all.
>
> | Did you open the pickled file in binary mode?
>
> No. should I ?
>
> Yours, Uwe
>
More information about the Python-list
mailing list