> Ok,
>
> After reading all posts (thanks a lot), I am considering to use the
> following base metaclass for all metaclasses that must lead to
> pickleable instances (not pickleable classes):
>
>
> import sys
>
> class Meta(type):
>def __new__(mcls, name, bases, attrs):
>cls = type.__ne
On Dec 29 2011, 10:55 am, lars van gemerden
wrote:
> Hello,
>
> Can someone help me with the following:
>
> I am using metaclasses to make classes and these classes to make
> instances. Now I want to use multiprocessing, which needs to pickle
> these instances.
>
> Pickle cannot find the class def
lars van gemerden wrote:
>> import pickle
>> import sys
>>
>> class MetaClass(type):
>> pass
>>
>> class M(object):
>> def __init__(self, module):
>> self.__module = module
>> def __getattr__(self, name):
>> print "creating class", name
>> class_ = MetaC
On Fri, Dec 30, 2011 at 9:51 AM, lars van gemerden wrote:
> I still wonder whether it might be easier to add the class to the
> namespace. Can anyone help me with that?
from mypackage import mymodule
setattr(mymodule, myclass.__name__, myclass)
--
http://mail.python.org/mailman/listinfo/python-
On Dec 30, 4:56 pm, lars van gemerden wrote:
> On Dec 30, 12:16 pm, lars van gemerden wrote:
>
>
>
>
>
>
>
>
>
> > On Dec 29, 8:55 pm, Ian Kelly wrote:
>
> > > On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden
> > > wrote:
>
> > > > Hello,
>
> > > > Can someone help me with the following:
>
>
On Dec 30, 12:16 pm, lars van gemerden wrote:
> On Dec 29, 8:55 pm, Ian Kelly wrote:
>
>
>
>
>
>
>
>
>
> > On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden
> > wrote:
>
> > > Hello,
>
> > > Can someone help me with the following:
>
> > > I am using metaclasses to make classes and these classe
lars van gemerden wrote:
> On Dec 29, 8:55 pm, Ian Kelly wrote:
>> On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden
>> wrote:
>>
>> > Hello,
>>
>> > Can someone help me with the following:
>>
>> > I am using metaclasses to make classes and these classes to make
>> > instances. Now I want to us
On Dec 29, 8:55 pm, Ian Kelly wrote:
> On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden
> wrote:
>
> > Hello,
>
> > Can someone help me with the following:
>
> > I am using metaclasses to make classes and these classes to make
> > instances. Now I want to use multiprocessing, which needs to pi
On Dec 29, 8:55 pm, Ian Kelly wrote:
> On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden
> wrote:
>
> > Hello,
>
> > Can someone help me with the following:
>
> > I am using metaclasses to make classes and these classes to make
> > instances. Now I want to use multiprocessing, which needs to pi
On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden wrote:
> Hello,
>
> Can someone help me with the following:
>
> I am using metaclasses to make classes and these classes to make
> instances. Now I want to use multiprocessing, which needs to pickle
> these instances.
>
> Pickle cannot find the cl
On 12/29/11 9:55 AM, lars van gemerden wrote:
Hello,
Can someone help me with the following:
I am using metaclasses to make classes and these classes to make
instances. Now I want to use multiprocessing, which needs to pickle
these instances.
Pickle cannot find the class definitions of the ins
Hello,
Can someone help me with the following:
I am using metaclasses to make classes and these classes to make
instances. Now I want to use multiprocessing, which needs to pickle
these instances.
Pickle cannot find the class definitions of the instances. I am trying
to add a line to the __new__
12 matches
Mail list logo