Ejemplo n.º 1
0
def _readSetFilterSection(xmlCtx, section, _, conditions):
    filterID = sub_parsers._parseID(xmlCtx, section, 'Specify a filter ID')
    value = []
    for name, subSec in _xml.getChildren(xmlCtx, section, 'value'):
        value.append(sub_parsers._readVarValue(name, subSec))

    return chapter.SetFilter(filterID, tuple(value), conditions=conditions)
Ejemplo n.º 2
0
def _readSetFilterSection(xmlCtx, section, _, conditions):
    filterID = sub_parsers._parseID(xmlCtx, section, 'Specify a filter ID')
    value = []
    for name, subSec in _xml.getChildren(xmlCtx, section, 'value'):
        value.append(sub_parsers._readVarValue(name, subSec))

    return chapter.SetFilter(filterID, tuple(value), conditions=conditions)
Ejemplo n.º 3
0
    def __readCommandsSection(self, xmlCtx, section):
        self.__commands.clear()
        for _, subSection in _xml.getChildren(xmlCtx, section, 'gui-commands'):
            commandID = sub_parsers._parseID(xmlCtx, subSection, 'Specify a command ID')
            cmdType = _xml.readString(xmlCtx, subSection, 'type')
            command = _xml.readString(xmlCtx, subSection, 'name')
            argsSec = _xml.getChildren(xmlCtx, subSection, 'args')
            args = []
            for name, argSec in argsSec:
                args.append(sub_parsers._readVarValue(name, argSec))

            self.__commands[commandID] = CommandData(cmdType, command, args)
Ejemplo n.º 4
0
    def __readCommandsSection(self, xmlCtx, section):
        self.__commands.clear()
        for _, subSection in _xml.getChildren(xmlCtx, section, 'gui-commands'):
            commandID = sub_parsers._parseID(xmlCtx, subSection,
                                             'Specify a command ID')
            cmdType = _xml.readString(xmlCtx, subSection, 'type')
            command = _xml.readString(xmlCtx, subSection, 'name')
            argsSec = _xml.getChildren(xmlCtx, subSection, 'args')
            args = []
            for name, argSec in argsSec:
                args.append(sub_parsers._readVarValue(name, argSec))

            self.__commands[commandID] = CommandData(cmdType, command, args)