def indent(text, nspaces, ch=' '):
    """
    Indent every line of the text string nspaces

    :param text:    Text string to be indented nspaces amount
    :param nspaces: Amount spaces to indent
    :param ch:      The space char or another char to prepend to the indent
    :return:        The new indented string
    """
    padding = nspaces * ch
    padded_lines_list = [padding+line for line in text.splitlines(True)]
    return ''.join(padded_lines_list)