'Indent/Undent all lines specified'

def BlockDent(self, isIndent, startLine, endLine):

    if (not self.GetDocument().CheckMakeDocumentWritable()):
        return 0
    tabSize = self.tabSize
    info = self._PrepareUserStateChange()
    try:
        for lineNo in range(startLine, endLine):
            pos = self._obj_.LineIndex(lineNo)
            self._obj_.SetSel(pos, pos)
            if isIndent:
                self.Indent()
            else:
                line = self._obj_.GetLine(lineNo)
                try:
                    noToDel = 0
                    if (line[0] == ' DCTB '):
                        noToDel = 1
                    elif (line[0] == '    '):
                        for noToDel in range(0, tabSize):
                            if (line[noToDel] != '    '):
                                break
                        else:
                            noToDel = tabSize
                    if noToDel:
                        self._obj_.SetSel(pos, (pos + noToDel))
                        self._obj_.Clear()
                except IndexError:
                    pass
    finally:
        self._EndUserStateChange(info)
    self.GetDocument().SetModifiedFlag(1)
    self._obj_.SetSel(self.LineIndex(startLine), self.LineIndex(endLine))
