From 90500b8c052f1ae5ac3870c509cd1f37786f7e3d Mon Sep 17 00:00:00 2001 From: duplo Date: Thu, 22 Jan 2009 19:38:09 +0000 Subject: [PATCH] Add functions for get the all the bertos modules and define lists git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2210 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/bertos_utils.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 1376942a..479f88ee 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -170,6 +170,12 @@ def loadModuleInfos(path): return moduleInfos return {} +def loadModuleInfosDict(path): + moduleInfosDict = {} + for filename, path in findDefinitions("*.h", path): + moduleInfosDict.update(loadModuleInfos(path + "/" + filename)) + return moduleInfosDict + def loadDefineLists(path): """ Return a dict with the name of the list as key and a list of string as value @@ -183,4 +189,10 @@ def loadDefineLists(path): if index != -1: exec(comment[index + 1:]) listDict.update(WIZARD_LIST) - return listDict \ No newline at end of file + return listDict + +def loadDefineListsDict(path): + defineListsDict = {} + for filename, path in findDefinitions("*.h", path): + defineListsDict.update(loadDefineLists(path + "/" + filename)) + return defineListsDict \ No newline at end of file -- 2.25.1