+def loadConfigurationInfos(path):
+ """
+ Return the module configurations found in the given file as a dict with the
+ parameter name as key and a dict containig the fields above as value:
+ "value": the value of the parameter
+ "description": the description of the parameter
+ "informations": a dict containig optional informations:
+ "type": "int" | "boolean" | "enum"
+ "min": the minimum value for integer parameters
+ "max": the maximum value for integer parameters
+ "long": boolean indicating if the num is a long
+ "value_list": the name of the enum for enum parameters
+ """
+ configurationInfos = {}
+ for comment, define in getDefinitionBlocks(open(path, "r").read()):
+ name, value = formatParamNameValue(define)
+ description, informations = getDescriptionInformations(comment)
+ configurationInfos[name] = {}
+ configurationInfos[name]["value"] = value
+ configurationInfos[name]["informations"] = informations
+ configurationInfos[name]["description"] = description
+ return configurationInfos
+