This commit is contained in:
deathbybandaid 2022-02-10 13:20:35 -05:00
parent 4566c9141f
commit f4585e0c43

View File

@ -1,6 +1,14 @@
import os
for module in os.listdir(os.path.dirname(__file__)):
if module == '__init__.py' or module[-3:] != '.py':
__all__ = []
import pkgutil
import inspect
for loader, name, is_pkg in pkgutil.walk_packages(__path__):
module = loader.find_module(name).load_module(name)
for name, value in inspect.getmembers(module):
if name.startswith('__'):
continue
__import__(".%s" % module[:-3], locals(), globals())
del module
globals()[name] = value
__all__.append(name)