Closed thepaul closed 10 years ago
do I see this correctly that load_plugins_from
appends to the errors list directly?
it is important that load_plugins
returns any errors (including the ones from load_plugins_from
), for display to users.
haven't tried it, but this probably works your code because the errors list is passed by reference; however it looks kindof obscure to do it this way.
how about load_plugins_from
returning the errors it encountered itself, and then extending the original list with those?
that would be fine. i'll make that change
nice. merged. thanks
This is mostly useful to make it easier to package GE as a deb or rpm, so people can install GE in system locations and still be able to disable or replace or enhance builtin metric plugins.
It allows the user to configure a list of plugin dirs. The system will load .py files from each one in turn, making it look like they were all part of the same python package. So plugins in a separate user dir will still be able to do "from . import Plugin" and get the right base class.