Jean-Paul Calderone wrote: > On Thu, 22 Feb 2007 15:36:42 +0100, "Diez B. Roggisch" > <[EMAIL PROTECTED]> wrote: >>> Simple plugin system proposal: >>> >>> have a package (directory with __init__.py) called plugins where the >>> actual plugins are modules in this directory. >>> >>> When the main script imports the plugins package, all plugin modules >>> would be available as plugins.pluginA, plugins.pluginB , etc. >>> >>> A registry of available plugins would be available as a simple >>> dir(plugins). >>> >>> code in the main script than wished to use a given plugin, would only >>> have to look in the registry before calling any code from a given >>> plugin. >>> >>> What is wrong/missing with this simple framework? >> >>Nothing wrong. > > Are you sure?
Darn. You're right of course - I just got the basic idea, and formed in my mind the "get the modules filename, thus the path, glob over it for *py, and thus get the subsequent module names"-pattern. Which is trivial of course, but not as trivial as just dir(module) Diez -- http://mail.python.org/mailman/listinfo/python-list