Christoph Haas wrote:
> On Sun, Sep 25, 2005 at 11:33:03PM -0400, Jeff Schwab wrote:
>
>>I recently came up against this exact problem. My preference is to have
>>the plugin writer call a method to register the plugins, as this allows
>>him the most control. Something along these lines:
>>
>>
On Sun, Sep 25, 2005 at 11:33:03PM -0400, Jeff Schwab wrote:
> I recently came up against this exact problem. My preference is to have
> the plugin writer call a method to register the plugins, as this allows
> him the most control. Something along these lines:
>
> class A_plugin(Plugin)
On Sun, Sep 25, 2005 at 11:24:04PM +0200, Christoph Haas wrote:
> Dear coders...
>
> I'm working on an application that is supposed to support "plugins".
> The idea is to use the plugins as packages like this:
>
> Plugins/
> __init__.py
> Plugin1.py
> Plugin2.py
> Plugin3.py
>
> When the
I wrote this one:
--
def load_plugin(self, plugin, paths):
import imp
# check if we haven't loaded it already
try:
return sys.modules[plugin]
except KeyError:
pass
# ok, the load it
fp, filen
Christoph Haas wrote:
> Dear coders...
>
> I'm working on an application that is supposed to support "plugins".
> The idea is to use the plugins as packages like this:
>
> Plugins/
> __init__.py
> Plugin1.py
> Plugin2.py
> Plugin3.py
>
> When the application starts up I want to have thes
Christoph Haas napisaĆ(a):
> Since I don't know which plugins have been put into that directory
> I cannot just "import Plugin1, Plugin2, Plugin3" in the "__init__.py".
> So I need to find out the *.py there and load them during startup.
> I could do that with a "walk" over that directory.
See en
Dear coders...
I'm working on an application that is supposed to support "plugins".
The idea is to use the plugins as packages like this:
Plugins/
__init__.py
Plugin1.py
Plugin2.py
Plugin3.py
When the application starts up I want to have these modules loaded
dynamically. Users can put th