6from os.path
import realpath, dirname, join, isdir
17 for filename
in listdir(answerers_dir):
18 if not isdir(join(answerers_dir, filename))
or filename.startswith(
'_'):
20 module = load_module(
'answerer.py', join(answerers_dir, filename))
21 if not hasattr(module,
'keywords')
or not isinstance(module.keywords, tuple)
or not module.keywords:
23 answerers.append(module)