Add debug include.
[bertos.git] / wizard / bertos_utils.py
index de56cfe6c2c3d3e65105e093c6691d57be841f36..e5a21d9b4989fa898ee518f9e55d936d88df9b66 100644 (file)
@@ -10,6 +10,7 @@
 #
 
 import os
+import fnmatch
 
 def isBertosDir(directory):
    return os.path.exists(directory + "/VERSION")
@@ -21,4 +22,12 @@ def createBertosProject(directory):
     if not os.path.isdir(directory):
         os.mkdir(directory)
     open(directory + "/project.bertos", "w")
-    
\ No newline at end of file
+
+def findDefinitions(ftype, path):
+    l = os.walk(path)
+    definitions = {}
+    for element in l:
+        for filename in element[2]:
+            if fnmatch.fnmatch(filename, "*." + ftype):
+                definitions[filename] = element[0]
+    return definitions
\ No newline at end of file