From 81123d01fd691c067b145f4bdc04c6b238634246 Mon Sep 17 00:00:00 2001 From: duplo Date: Wed, 22 Apr 2009 09:34:10 +0000 Subject: [PATCH] Find automatically the plugins in the directory plugin git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2616 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/plugins/__init__.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/wizard/plugins/__init__.py b/wizard/plugins/__init__.py index 0174745c..fdb47bca 100644 --- a/wizard/plugins/__init__.py +++ b/wizard/plugins/__init__.py @@ -4,7 +4,17 @@ # Copyright 2009 Develer S.r.l. (http://www.develer.com/) # All rights reserved. # -# $Id:$ +# $Id$ # # Author: Lorenzo Berni -# \ No newline at end of file +# + +import os +import glob + +_modules = glob.glob(os.path.dirname(os.path.abspath(__file__)) + os.sep + "*.py") +_modules = [os.path.basename(module) for module in _modules] +__all__ = [] +for module in _modules: + if module != "__init__.py": + __all__.append(module.replace(".py", "")) -- 2.25.1