Actual output:
I am a cover.
I am a cover.
Expected output:
I am a cover.
I am a genre.
| [Core] | |
| Name = Cover | |
| Module = movie | |
| [Documentation] | |
| Description = A cover plugin | |
| Author = My very own name | |
| Version = 0.1 | |
| Website = My very own website |
| [Core] | |
| Name = Genre | |
| Module = movie | |
| [Documentation] | |
| Description = A genre plugin | |
| Author = My very own name | |
| Version = 0.1 | |
| Website = My very own website |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| from yapsy.PluginManager import PluginManager | |
| if __name__ == '__main__': | |
| # Build the manager | |
| simplePluginManager = PluginManager() | |
| # Tell it the default place(s) where to find plugins | |
| simplePluginManager.setPluginPlaces(["plugin"]) | |
| # Load all plugins | |
| simplePluginManager.collectPlugins() | |
| # Activate all loaded plugins | |
| for pluginInfo in simplePluginManager.getAllPlugins(): | |
| simplePluginManager.activatePluginByName(pluginInfo.name) | |
| plugin = pluginInfo.plugin_object | |
| plugin.do_something() |
| from yapsy.IPlugin import IPlugin | |
| class IGenre(IPlugin): | |
| pass | |
| class ICover(IPlugin): | |
| pass | |
| class Genre(IGenre): | |
| def do_something(self): | |
| print('I am a genre.') | |
| class Cover(ICover): | |
| def do_something(self): | |
| print('I am a cover.') |
Actual output:
I am a cover.
I am a cover.
Expected output:
I am a cover.
I am a genre.
| . | |
| ├── main.py | |
| └── plugin/ | |
| ├── cover.yapsy-plugin | |
| ├── genre.yapsy-plugin | |
| ├── movie.py |