blob: 34d88b749ddb7b849f77a248a69ee5ddf0e49423 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
from os.path import realpath, dirname, splitext, join
from os import listdir
from imp import load_source
engine_dir = dirname(realpath(__file__))
engines = []
for filename in listdir(engine_dir):
modname = splitext(filename)[0]
if filename.startswith('_') or not filename.endswith('.py'):
continue
filepath = join(engine_dir, filename)
engines.append(load_source(modname, filepath))
|