def print_indent(t, indent=4):
    """
    print a text (eg a python piece of code) with indent
    :param t: text (string with \n)
    :param indent: indentation
    :return: formatted text
    """
    s_indent = "&nbsp;"*indent
    return s_indent + t.replace('\n', '<br>' + s_indent).replace('\t', s_indent)