Olivier Dormond ha escrito:
> > xxx = new.instance(MyClass, {'a':1,'b':2,'done':1})
> >
> > In other words, I need a *string* which, being sent to eval(), would
> > return the original object state saved in the pickle.
>
> Doesn't pickle.loads just do what you need ? e.g.:
>
> >>> pickled = file('
Jean-Paul Calderone ha escrito:
> >In other words, I need a *string* which, being sent to eval(), would
> >return the original object state saved in the pickle.
>
> You may find twisted.persisted.aot of some use. Here is an example:
>
> AOT is unmaintained in Twisted, and may not support some ne
Gabriel Genellina wrote:
> Or perhaps:
>
> xxx = new.instance(MyClass, {'a':1,'b':2,'done':1})
>
> In other words, I need a *string* which, being sent to eval(), would
> return the original object state saved in the pickle.
> As has been pointed, repr() would do that for simple types. But I need
On 26 Oct 2005 06:15:35 -0700, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>> I want to convert from pickle format to python source code. That is,
>> given an existing pickle, I want to produce a textual representation
>> which, when evaluated, yields the original object (as if I had
>> unpickled
> I want to convert from pickle format to python source code. That is,
> given an existing pickle, I want to produce a textual representation
> which, when evaluated, yields the original object (as if I had
> unpickled the pickle).
> I know of some transformations pickle/xml (Zope comes with one su
Maksim Kasimov ha escrito:
> As far i know, in pickle-file there are only attributes values of a pickled
> object, but not an object itself.
>
> It is possible to unpickle object only if you have the sourse of the class
> that object you have pickled.
> So, if you have class code and attribute
Benjamin Niemann ha escrito:
> Gabriel Genellina wrote:
>
> > I want to convert from pickle format to python source code. That is,
> > given an existing pickle, I want to produce a textual representation
> > which, when evaluated, yields the original object (as if I had
>
> If all objects correctl
As far i know, in pickle-file there are only attributes values of a pickled
object, but not an object itself.
It is possible to unpickle object only if you have the sourse of the class that
object you have pickled.
So, if you have class code and attribute values of the class instance, there is
Gabriel Genellina wrote:
> I want to convert from pickle format to python source code. That is,
> given an existing pickle, I want to produce a textual representation
> which, when evaluated, yields the original object (as if I had
> unpickled the pickle).
> I know of some transformations pickle/x
Hello
I want to convert from pickle format to python source code. That is,
given an existing pickle, I want to produce a textual representation
which, when evaluated, yields the original object (as if I had
unpickled the pickle).
I know of some transformations pickle/xml (Zope comes with one such
10 matches
Mail list logo