test
This commit is contained in:
parent
4566c9141f
commit
f4585e0c43
@ -1,6 +1,14 @@
|
||||
import os
|
||||
for module in os.listdir(os.path.dirname(__file__)):
|
||||
if module == '__init__.py' or module[-3:] != '.py':
|
||||
continue
|
||||
__import__(".%s" % module[:-3], locals(), globals())
|
||||
del module
|
||||
__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
|
||||
|
||||
globals()[name] = value
|
||||
__all__.append(name)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user