How to make a plugin architecture batch Python tools?
I want to make the functionality of the program could easily expand the community in some standard way.
For example, doing a simple program like ls, it iterates through the files and causes all plugins to file. All the plugins we have inherited from our class Plugin(). There is only NamePlugin() which writes the file name.
Further, the user makes "pip install lsplugins.filesize" puts a package (another developer) and we have more and FileSizePlugin() and our ls still writes to the file size. And if you install PluginMD5(), it will be even and md5 sums to write.
It is possible to do so (the package of the second level, from another vendor)?
Want additional functionality appear automatically after "pip install ...", so somehow our code has to know about all available plugins.
There are all sorts of frameworks for plugins. You can write your own. Throw all the plugins in some directory and import them as files. But it's all ugly. Maybe there is a standard Python path.