multiple inheritance of a dynamic list of classes?

2007-02-12 Thread devicerandom
Hi, I am currently using the Cmd module for a mixed cli+gui application. I am starting to refactor my code and it would be highly desirable if many commands could be built as simple plugins. My idea was: - Load a list of plugin names (i.e. from the config file, or from the plugins directory) - Im

Re: multiple inheritance of a dynamic list of classes?

2007-02-12 Thread devicerandom
> Most of the above should be straight-forward. I used type(cmd.Cmd)(name, > bases, classdict) instead of just type(name, bases, classdict) because > cmd.Cmd is a classic class. It seems it works. It is not so straight-forward to me because I don't know about new-style types and classes very well

Re: multiple inheritance of a dynamic list of classes?

2007-02-12 Thread devicerandom
Thanks both for suggestions. I still think that using inheritance is somehow cleanest in this case (I always hear the mantra "avoid multiple inheritance!", but this is one of the cases it seems to make a lot of sense to me), but it's nice food for thought/code anyway. Other suggestions are always

Re: multiple inheritance of a dynamic list of classes?

2007-02-13 Thread devicerandom
On 13 Feb, 09:14, Peter Otten <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Thanks both for suggestions. I still think that using inheritance is > > somehow cleanest in this case (I always hear the mantra "avoid > > multiple inheritance!", but this is one of the cases it seems to make >