File size: 363 Bytes
7fbdac4
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import importlib
import os

from internals.util import getcwd

path = os.path.join(getcwd(), "external/scripts")

__scripts__ = []
for name in os.listdir(path):
    name = name.split("/")[-1].replace(".py", "")
    imp = importlib.import_module(f"external.scripts.{name}")
    if hasattr(imp, "Script") and imp not in __scripts__:
        __scripts__.append(imp)