diff --git a/FoxDot/__init__.py b/FoxDot/__init__.py index 5cf82b7d..a06402b7 100644 --- a/FoxDot/__init__.py +++ b/FoxDot/__init__.py @@ -19,6 +19,8 @@ from __future__ import absolute_import, division, print_function +import importlib.metadata + def boot_supercollider(): """ Uses subprocesses to boot supercollider from the cli """ @@ -110,6 +112,15 @@ def main(): from .lib.Workspace.Editor import workspace FoxDot = workspace(FoxDotCode).run() + +# load plugins +for _ep in importlib.metadata.entry_points(group="FoxDot.namespace_hooks"): + try: + _ep.load()(FoxDotCode.namespace) + except: + pass + + def Go(): """ Function to be called at the end of Python files with FoxDot code in to keep the TempoClock thread alive. """