Find automatically the plugins in the directory plugin
[bertos.git] / wizard / plugins / __init__.py
index 0174745c3a859606d37519457393b9cf3ddec6d9..fdb47bcaa6a47d79b9e9e80e13df393b1c4ac04b 100644 (file)
@@ -4,7 +4,17 @@
 # Copyright 2009 Develer S.r.l. (http://www.develer.com/)
 # All rights reserved.
 #
-# $Id:$
+# $Id$
 #
 # Author: Lorenzo Berni <duplo@develer.com>
-#
\ 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", ""))