(width, filename)
Return width long restart line formatted with filename.

    Fill line with balanced '='s, with any extras and at least one at
    the beginning.  Do not end with a trailing space.
Return width long restart line formatted with filename.
Return width long restart line formatted with filename .
def restart_line(width, filename):  # See bpo-38141.
    """Return width long restart line formatted with filename.

    Fill line with balanced '='s, with any extras and at least one at
    the beginning.  Do not end with a trailing space.
    """
    tag = f"= RESTART: {filename or 'Shell'} ="
    if width >= len(tag):
        div, mod = divmod((width -len(tag)), 2)
        return f"{(div+mod)*'='}{tag}{div*'='}"
    else:
        return tag[:-2]
def restart_line ( width , filename ) : # See bpo-38141. tag = f"= RESTART: {filename or 'Shell'} =" if width >= len ( tag ) : div , mod = divmod ( ( width - len ( tag ) ) , 2 ) return f"{(div+mod)*'='}{tag}{div*'='}" else : return tag [ : - 2 ]