/
githubmirror
/
edx-platform
Обзор
Документация
Войти
/
githubmirror
/
edx-platform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
release-ulmo
scripts/xblock/list-installed.py
30 строк
600 B
Irtaza Akram
fix: replace pkg_resources with importlib.resources (#36213)
13 фев 2025, 15:43
Не верифицирован
13 фев 2025, 15:43
a8a8ae3
Код
Авторство
О чём код?
""" Lookup list of installed XBlocks, to aid XBlock developers """ from importlib.metadata import entry_points def get_without_builtins(): """ Get all installed XBlocks but try to omit built-in XBlocks, else the output is less helpful """ xblocks = [ entry_point.name for entry_point in entry_points(group='xblock.v1') if not entry_point.value.startswith('xmodule') ] return sorted(xblocks) def main(): """ Run the main script """ for name in get_without_builtins(): print(name) if __name__ == '__main__': main()