Hi Hrvoje,

I tried also as follows:

#!/usr/bin/env python

import wx

class CopyAndPaste(object):
    def __init__(self):
        pass

    def set_copy_and_paste(self):
    ...


and CopyAndPaste is being called with:

...
class ListControlMeta(wx.Frame, CopyAndPaste):
    pass

class ListControl(wx.Frame, CopyAndPaste):

    def __init__(self, parent, id, title, list, max_list_width, log_stream, 
style=wx.DEFAULT_FRAME_STYLE):

        wx.Frame.__init__(self,parent,id,title,size=(max_list_width,-1), 
style=style)
        self.list = list
        ...

But I'm still getting:

$ python -u ./failover_pickle_demo09.py
Traceback (most recent call last):
  File "./failover_pickle_demo09.py", line 324, in <module>
    class ListControlMeta(wx.Frame, CopyAndPaste):
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) 
subclass of the metaclasses of all its bases

So, obviously the line in blue is not to Python's liking.

Bye,
Ron.

> -----Original Message-----
> From: Hrvoje Niksic [mailto:hnik...@xemacs.org]
> Sent: Sunday, February 22, 2009 14:05
> To: python-list@python.org
> Subject: Re: "metaclass conflict" error: where is noconflict ?
>
> "Barak, Ron" <ron.ba...@lsi.com> writes:
>
> > class CopyAndPaste():
>
> CopyAndPaste is an old-style class.  Make it a new-style
> class, and you'll probably be able to inherit from it and
> wx.Frame without explicitly creating a new metaclass.
>
>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to