def converttabs(text, spaces=4):
    """

    Convert all the tabs to a specific amount of spaces

    text:
    The text to convert tabs to spaces on

    spaces:
    The amount of spaces to replace tabs to. Default is 4.

    """

    return text.replace('\t', ' ' * spaces)