From ae9fb1d7dccf061032b5d4b167086838feb1463d Mon Sep 17 00:00:00 2001 From: asciimoo Date: Mon, 14 Oct 2013 23:09:13 +0200 Subject: [enh] initial commit --- searx/engines/__init__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 searx/engines/__init__.py (limited to 'searx/engines/__init__.py') diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py new file mode 100644 index 000000000..34d88b749 --- /dev/null +++ b/searx/engines/__init__.py @@ -0,0 +1,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)) -- cgit v1.2.3