Hi, > -----Original Message----- > From: Tim Golden [mailto:m...@timgolden.me.uk] > Sent: Monday, February 23, 2009 11:37 > Cc: python-list@python.org; wxpython-us...@lists.wxwidgets.org > Subject: Re: Metaclass conflict TypeError exception: problem > demonstration script > > > $ cat -n metaclass_test01.py | head > > 1 #!/usr/bin/env python > > 2 > > 3 import sys > > 4 import wx > > 5 import CopyAndPaste > > 6 > > 7 class ListControl(wx.Frame, CopyAndPaste): > > 8 #class ListControl(wx.Frame): > > 9 def __init__(self, parent, id, title, list, > max_list_width): > > 10 > wx.Frame.__init__(self,parent,id,title,size=(-1,-1), > style=wx.DEFAULT_FRAME_STYLE) > > > > I get the metaclass conflict exception: > > > You're trying to use a module as a base class. > Don't do that; it doesn't work. > > TJG > >
That's it. Once I changed my class header to: $ cat -n metaclass_test01.py 1 #!/usr/bin/env python 2 3 import sys 4 import wx 5 import CopyAndPaste 6 7 class ListControl(wx.Frame, CopyAndPaste.CopyAndPaste): I'm getting no more Metaclass conflict TypeError exceptions :-) (a clear case of "The Devil Is In The ...") Thanks so much, Ron.
-- http://mail.python.org/mailman/listinfo/python-list