Spaces:
Sleeping
Sleeping
async def all_plugins(): | |
# This generates a list of plugins in this folder for the * in __main__ to | |
# work. | |
from glob import glob | |
from os.path import isfile, dirname, basename | |
mod_paths = glob(dirname(__file__) + "/*.py") | |
all_plugs = [ | |
basename(f)[:-3] | |
for f in mod_paths | |
if isfile(f) and f.endswith(".py") and not f.endswith("__init__.py") | |
] | |
return sorted(all_plugs) | |