Implement a new plugin system using multiple-inheritance
commit9128022919f301bfe46fbd55cca2a62f0e4e6977
authorSteven Walter <swalter@lpdev.prtdev.lexmark.com>
Tue, 29 Jul 2008 17:06:46 +0000 (29 13:06 -0400)
committerSteven Walter <swalter@lpdev.prtdev.lexmark.com>
Tue, 29 Jul 2008 17:57:57 +0000 (29 13:57 -0400)
tree285372cdae9e0d5a4d41e5eecf97510d8146c7d9
parent7697f8d9862403a2c31860e54a8212c93945c7a9
Implement a new plugin system using multiple-inheritance

First, we split all the interesting functions out of Yap into a new
class, YapCore.  Yap retains only the "main" method.  Yap is a metaclass
with dynamically-determined inheritance.  The yap_metaclass function
loads all plugins and creates the list of parents of Yap.  In this way,
commands (and even utility functions) can be overriden in a sane way
using standard python OO.
yap.py
yap/__init__.py
yap/yap.py