hwt/hdl/frameTmplUtils.py
def groupByWordIndex(self, transaction: 'TransTmpl', offset: int):
        """
        Group transaction parts splited on words to words

        :param transaction: TransTmpl instance which parts
            should be grupped into words
        :return: generator of tuples (wordIndex, list of transaction parts
            in this word)
        """
        actualW = None
        partsInWord = []
        wordWidth = self.wordWidth
        for item in self.splitOnWords(transaction, offset):
            _actualW = item.startOfPart // wordWidth
            if actualW is None:
                actualW = _actualW
                partsInWord.append(item)
            elif _actualW > actualW:
                yield (actualW, partsInWord)
                actualW = _actualW
                partsInWord = [item, ]
            else:
                partsInWord.append(item)

        if partsInWord:
            yield (actualW, partsInWord)
def groupByWordIndex(self, transaction: 'TransTmpl', offset: int):
        actualW = None
        partsInWord = []
        wordWidth = self.wordWidth
        for item in self.splitOnWords(transaction, offset):
            _actualW = item.startOfPart // wordWidth
            if actualW is None:
                actualW = _actualW
                partsInWord.append(item)
            elif _actualW > actualW:
                yield (actualW, partsInWord)
                actualW = _actualW
                partsInWord = [item, ]
            else:
                partsInWord.append(item)

        if partsInWord:
            yield (actualW, partsInWord)
def groupByWordIndex ( self , transaction : 'TransTmpl' , offset : int ) : actualW = None partsInWord = [ ] wordWidth = self . wordWidth for item in self . splitOnWords ( transaction , offset ) : _actualW = item . startOfPart // wordWidth if actualW is None : actualW = _actualW partsInWord . append ( item ) elif _actualW > actualW : yield ( actualW , partsInWord ) actualW = _actualW partsInWord = [ item , ] else : partsInWord . append ( item ) if partsInWord : yield ( actualW , partsInWord )
Group transaction parts splited on words to words

        :param transaction: TransTmpl instance which parts
            should be grupped into words
        :return: generator of tuples (wordIndex, list of transaction parts
            in this word)
Group transaction parts splited on words to words