[Tutor] pickling?

Hugo González Monteverde hugonz-lists at h-lab.net
Mon Nov 29 23:50:43 CET 2004


I guess pickling may be what you need. Basically you don't need to come 
up with a specific way to save your objects to a file (or send them over 
a network)  but you can rely on pickle to do it for you.

One of the issues is that the pickle format (a formatted stream of 
bytes) is python specific, so this may not be what you need if you 
intend to communicate with a non python app.

It is indeed a good way to store matrices (either bidimensional lists or 
more efficient numeric matrices like those found in the numarray package)

Hugo

Jeff Peery wrote:
> hello, I am not sure what pickling is, could someone give me a quick 
> synopsis for a newbie?
>  
> the reason I ask is that I think it might be useful for an application I 
> am working on. Is pickling the process of storing data for later use? I 
> have a system that measures liquid flow rate and we do regular 
> measurements with flow meters, and I want to setup a statistical quality 
> control system. the fiirst thing I am doing is sorting the measurement 
> into categories and then I will do the stats. anyhow, I will have to 
> store lots of information in a file and access it regularly to read and 
> append new measurements.  Is pickling a good way to store matricies and 
> then pick then up later for use in python?
>  
> thanks
>  
> Jeff
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor


More information about the Tutor mailing list