peter at engcorp.com
Sat Oct 30 17:02:35 CEST 2004
Reinhold Birkenfeld wrote:
> Irmen de Jong wrote:
>>Reinhold Birkenfeld wrote:
>>>How would you implement a plugin system (for a web-based application)?
>>This is so general a question that I cannot think of anything concrete to answer.
>>Please ask again, with more detail about what you want/need/have in mind.
> Okay, the question is too open: My focus is on how you would structure
> the plugin code (directories, files) and how you would write code to
> load these plugins.
And _this_ sounds like a combination of something that's more
a design issue (the structure) and a trivial implementation
detail (trivial in Python, anyway).
I'll try anyway, as a first test case: put all plugins in a
standard folder, with nothing else present in that folder.
They can be individual modules or packages as you will.
The code to load the plugin consists of an __import__...
and not much else.
Maybe this feedback will help you refine the question further...
More information about the Python-list