'Get the line indent value, text, and any block start keyword
If the line does not start a block, the keyword value is False.
The indentation of empty lines (or comment lines) is INFINITY.'

def get_line_info(self, linenum):

    text = self.text.get(('%d.0' % linenum), ('%d.end' % linenum))
    (spaces, firstword) = getspacesfirstword(text)
    opener = ((firstword in BLOCKOPENERS) and firstword)
    if ((len(text) == len(spaces)) or (text[len(spaces)] == '#')):
        indent = INFINITY
    else:
        indent = len(spaces)
    return (indent, text, opener)
