'Creates a properly set up line.
:line: the text to add
:indent: the indentation to have at the beginning
if None, it uses the default amount'

def mkline(self, line='', indent=None):

    if (indent is None):
        indent = self.indent
        if ('\n' not in self._rv):
            try:
                indent = indent[len(self._initial_indent):]
            except IndexError:
                indent = ''
        indent = self._ind.spaces_to_indent(indent)
    return (indent + line)
