Spaces:
Paused
Paused
Download Powers/plugins/__init__.py from Dragdev/telegrambot: direct link, hf CLI and curl.
- Browser
- Download file 426 Bytes
-
https://huggingface.co/spaces/Dragdev/telegrambot/resolve/7e375079f94c6d451da00a221aacea4783a3e044/Powers/plugins/__init__.py
- Command line
-
hf download hf://spaces/Dragdev/telegrambot@7e375079f94c6d451da00a221aacea4783a3e044/Powers/plugins/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/Dragdev/telegrambot/resolve/7e375079f94c6d451da00a221aacea4783a3e044/Powers/plugins/__init__.py
426 Bytes
| 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 basename, dirname, isfile | |
| 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) | |