From: duplo Date: Thu, 22 Jan 2009 19:38:09 +0000 (+0000) Subject: Add functions for get the all the bertos modules and define lists X-Git-Tag: 2.1.0~472 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=90500b8c052f1ae5ac3870c509cd1f37786f7e3d;p=bertos.git 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 --- 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