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/492d7fcd90594de1ce93896bb2a9b2f9e1927150/Powers/plugins/__init__.py
- Command line
-
hf download hf://spaces/Dragdev/telegrambot@492d7fcd90594de1ce93896bb2a9b2f9e1927150/Powers/plugins/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/Dragdev/telegrambot/resolve/492d7fcd90594de1ce93896bb2a9b2f9e1927150/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) | |