'return formatted and marked up source lines.'

def get_source(self, source, line_index=(-1), excinfo=None, short=False):

    lines = []
    if ((source is None) or (line_index >= len(source.lines))):
        source = py.code.Source('???')
        line_index = 0
    if (line_index < 0):
        line_index += len(source)
    space_prefix = '                '
    if short:
        lines.append((space_prefix + source.lines[line_index].strip()))
    else:
        for line in source.lines[:line_index]:
            lines.append((space_prefix + line))
        lines.append(((self.flow_marker + '            ') + source.lines[line_index]))
        for line in source.lines[(line_index + 1):]:
            lines.append((space_prefix + line))
    if (excinfo is not None):
        indent = (4 if short else self._getindent(source))
        lines.extend(self.get_exconly(excinfo, indent=indent, markall=True))
    return lines
