Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Load multiple plugins from a parent plugin folder
#2
IMHO your best course of action is to have one file containing the registration of all the plugins. The plugin code then mostly imports your other files as python modules. To do so you have to extend the Pyhon path to add the directory where the modules are, which is the directory where your "main"/registration file is. This one can retrieve its location as os.path.abspath(sys.argv[0]). You can also have your functions in the main with one or more python modules for the "ancillaries", or even have one module per function, and all the modules sharing a common "library" module.

Edit: attached ZIP with proof-of-concept code.

Edit2: For completeness, proof-of-concept is now a main that calls modules that call a common library


Attached Files
.zip   Modules.zip (Size: 2.03 KB / Downloads: 201)
Reply


Messages In This Thread
RE: Load multiple plugins from a parent plugin folder - by Ofnuts - 02-26-2019, 07:22 AM

Forum Jump: