printtools/putil.py
def span(left, right, *args, width=get_terminal_size().columns, char=' '):
    """Set up left and right alignment.

    Parameters
    ----------
    left : str
        Left string; to be left aligned
    right : str
        Right string; to be right aligned
    *args : list
        Additional arguments to render the span with

    Keyword Args
    ------------
    width : int
        Width of the span; defaults to terminal width
    char : str
        Character to fill the span with; defaults to ' '
    """
    slen = width - len(clear_fmt(left)) - len(clear_fmt(right))
    return left + render(char * slen, *args) + right
Set up left and right alignment.

    Parameters
    ----------
    left : str
        Left string; to be left aligned
    right : str
        Right string; to be right aligned
    *args : list
        Additional arguments to render the span with

    Keyword Args
    ------------
    width : int
        Width of the span; defaults to terminal width
    char : str
        Character to fill the span with; defaults to ' '
    
Set up left and right alignment.
Parameters

left : str
Left string; to be left aligned
right : str
Right string; to be right aligned
args : list
Additional arguments to render the span with

Keyword Args

width : int
Width of the span; defaults to terminal width
char : str
Character to fill the span with; defaults to ' '
Set up left and right alignment . Parameters left : str Left string ; to be left aligned right : str Right string ; to be right aligned args : list Additional arguments to render the span with Keyword Args width : int Width of the span ; defaults to terminal width char : str Character to fill the span with ; defaults to ' '
def span(left, right, *args, width=get_terminal_size().columns, char=' '):
    slen = width - len(clear_fmt(left)) - len(clear_fmt(right))
    return left + render(char * slen, *args) + right
def span ( left , right , * args , width = get_terminal_size ( ) . columns , char = ' ' ) : slen = width - len ( clear_fmt ( left ) ) - len ( clear_fmt ( right ) ) return left + render ( char * slen , * args ) + right
Set up left and right alignment.
Set up left and right alignment .
"""Set up left and right alignment.

    Parameters
    ----------
    left : str
        Left string; to be left aligned
    right : str
        Right string; to be right aligned
    *args : list
        Additional arguments to render the span with

    Keyword Args
    ------------
    width : int
        Width of the span; defaults to terminal width
    char : str
        Character to fill the span with; defaults to ' '
    """
left
right
width
char