import textwrap


def indent(s,prefix):
    """
    Wrapper for textwrap.indent to handle Python2/3
    """
    try:
        # Python3
        return textwrap.indent(s,prefix)
    except AttributeError:
        # Python2
        return '\n'.join([prefix+line.rstrip('\n')
                          for line in s.splitlines(True)])