Automatically register all extensions in the extension directory (without explicit init import)

This commit is contained in:
jtc42 2020-01-05 20:02:22 +00:00
parent 7888d97220
commit 585633020b
4 changed files with 33 additions and 13 deletions

View file

@ -182,7 +182,7 @@ DEFAULT_CONFIG_FILE_PATH = os.path.join(HERE, "microscope_settings.default.json"
USER_CONFIG_DIR = os.path.join(os.path.expanduser("~"), ".openflexure")
USER_CONFIG_FILE_PATH = os.path.join(USER_CONFIG_DIR, "microscope_settings.json")
USER_EXTENSIONS_PATH = os.path.join(USER_CONFIG_DIR, "microscope_extensions", "__init__.py")
USER_EXTENSIONS_PATH = os.path.join(USER_CONFIG_DIR, "microscope_extensions")
# Load the default config
with open(DEFAULT_CONFIG_FILE_PATH, "r") as default_rc: