pythonware.com products ::: library ::: search ::: daily Python-URL!
A Django site.
   

Daily Python-URL

2008-01-11

Marty Alchin: A Simple Plugin Framework ["So, what does it really take to implement a plugin 'architecture'? Outside the framework, when implementing plugins themselves, there are three things that are really necessary: 1. A way to declare a mount point for plugins. /.../ 2. A way to register a plugin at a particular mount point. /.../ 3. A way to retrieve the plugins that have been registered. That may seem like an incredibly complicated task, and it certainly could be, as evidenced by the Zope implementation of the above requirements. But it can actually be done in just 6 lines of Python. This may seem impossible, but the following code successfully fulfills all three of the above requirements. "]

::: back to daily-URL