Graphics/ImportsDiagram.py

changeset 40
c2e5472b112c
parent 28
dde24fc7f7ba
child 96
9624a110667d
diff -r ce735122a1fb -r c2e5472b112c Graphics/ImportsDiagram.py
--- a/Graphics/ImportsDiagram.py	Fri Jan 08 14:45:03 2010 +0000
+++ b/Graphics/ImportsDiagram.py	Fri Jan 08 17:04:18 2010 +0000
@@ -21,6 +21,7 @@
 
 import Utilities.ModuleParser
 import Utilities
+import Preferences
 
 class ImportsDiagram(UMLDialog):
     """
@@ -66,10 +67,12 @@
         @return dictionary of modules contained in the package.
         """
         moduleDict = {}
-        # TODO: change this to use configured Python extensions
-        modules = glob.glob(Utilities.normjoinpath(self.packagePath,'*.py')) + \
-                  glob.glob(Utilities.normjoinpath(self.packagePath,'*.pyw')) + \
-                  glob.glob(Utilities.normjoinpath(self.packagePath,'*.ptl'))
+        modules = []
+        for ext in Preferences.getPython("PythonExtensions") + \
+                    Preferences.getPython("Python3Extensions"):
+            modules.extend(
+                glob.glob(Utilities.normjoinpath(self.packagePath, '*%s' % ext)))
+        
         tot = len(modules)
         try:
             prog = 0

eric ide

mercurial