Re: Save/Store whole class (or another object) in a file

2006-10-25 Thread Gabriel Genellina
At Wednesday 25/10/2006 11:32, [EMAIL PROTECTED] wrote: Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > thanks for the reply,but unfortunately this does not work with the type > > of classes I am dealing with. When trying to pickle the class I get the > > following error: > > > > File "/usr

Re: Save/Store whole class (or another object) in a file

2006-10-25 Thread alexLIGO
Hi, Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > thanks for the reply,but unfortunately this does not work with the type > > of classes I am dealing with. When trying to pickle the class I get the > > following error: > > > > File "/usr/lib/python2.4/copy_reg.py", line 76, in _reduce_ex

Re: Save/Store whole class (or another object) in a file

2006-10-18 Thread Michele Simionato
[EMAIL PROTECTED] wrote: > Hi, > > thanks for the reply,but unfortunately this does not work with the type > of classes I am dealing with. When trying to pickle the class I get the > following error: > > File "/usr/lib/python2.4/copy_reg.py", line 76, in _reduce_ex > raise TypeError("a class t

Re: Save/Store whole class (or another object) in a file

2006-10-18 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > thanks for the reply,but unfortunately this does not work with the type > of classes I am dealing with. When trying to pickle the class I get the > following error: > > File "/usr/lib/python2.4/copy_reg.py", line 76, in _reduce_ex > raise TypeError("a class that def

Re: Save/Store whole class (or another object) in a file

2006-10-18 Thread alexLIGO
Hi, thanks for the reply,but unfortunately this does not work with the type of classes I am dealing with. When trying to pickle the class I get the following error: File "/usr/lib/python2.4/copy_reg.py", line 76, in _reduce_ex raise TypeError("a class that defines __slots__ without " TypeErr

Re: Save/Store whole class (or another object) in a file

2006-10-17 Thread Matimus
> is it possible in python (with/without matplotlib, numpy etc) to store > a whole class with its data into a file, instead it to reconstruct > every time again? So is there an analogous to the matlab functions > load/save available? look up the pickle module. -- http://mail.python.org/mailman/l

Re: Save/Store whole class (or another object) in a file

2006-10-17 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > is it possible in python (with/without matplotlib, numpy etc) to > store a whole class with its data into a file Check out the pickle module. Sybren -- Sybren Stüvel Stüvel IT - http://www.stuvel.eu/ -- http://mail.python.org/mailman/listinfo/python-li

Save/Store whole class (or another object) in a file

2006-10-17 Thread alexLIGO
Hi, is it possible in python (with/without matplotlib, numpy etc) to store a whole class with its data into a file, instead it to reconstruct every time again? So is there an analogous to the matlab functions load/save available? Thanks Alex -- http://mail.python.org/mailman/listinfo/python-l