From 9cfd7f964a3ac08462c973d405fe2b2effe1e859 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 10 Feb 2022 13:16:29 -0500 Subject: [PATCH] test --- sopel_SpiceBot_Runtime_Commands/__init__.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sopel_SpiceBot_Runtime_Commands/__init__.py b/sopel_SpiceBot_Runtime_Commands/__init__.py index 781fcee..bc60c2e 100644 --- a/sopel_SpiceBot_Runtime_Commands/__init__.py +++ b/sopel_SpiceBot_Runtime_Commands/__init__.py @@ -1,4 +1,12 @@ -import pkgutil -__path__ = pkgutil.extend_path(__path__, __name__) -for imp, module, ispackage in pkgutil.walk_packages(path=__path__, prefix=__name__+'.'): - __import__(module) +#!/usr/bin/python +# -*- encoding: utf-8 -*- + +import os +import glob + +all_list = list() +for f in glob.glob(os.path.dirname(__file__)+"/*.py"): + if os.path.isfile(f) and not os.path.basename(f).startswith('_'): + all_list.append(os.path.basename(f)[:-3]) + +__all__ = all_list