Does pickled objects work fine between different OS?

Grant Edwards invalid at invalid.invalid
Wed May 26 12:23:48 EDT 2010


On 2010-05-26, Oltmans <rolf.oltmans at gmail.com> wrote:

> If I dump a Python dictionary into a file named "data.pkl" using
> Pickle module on a Linux operating system, will the data contained in
> "data.pkl" load fine in a Windows OS?

That depends on the data and the version of Python.  Older versions
didn't handle some floating point values (NAN, INF) in a portable
manner, and loading the pickled data would fail when such a value was
encountered.

-- 
Grant Edwards               grant.b.edwards        Yow! It's the RINSE CYCLE!!
                                  at               They've ALL IGNORED the
                              gmail.com            RINSE CYCLE!!



More information about the Python-list mailing list