From: duplo Date: Wed, 22 Apr 2009 09:34:10 +0000 (+0000) Subject: Find automatically the plugins in the directory plugin X-Git-Tag: 2.1.0~66 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=81123d01fd691c067b145f4bdc04c6b238634246;p=bertos.git Find automatically the plugins in the directory plugin git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2616 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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", ""))