def columnize(items, separator='  ', displaywidth=80):
    """ Transform a list of strings into a single string with columns.

    Parameters
    ----------
    items : sequence of strings
        The strings to process.

    separator : str, optional [default is two spaces]
        The string that separates columns.

    displaywidth : int, optional [default is 80]
        Width of the display in number of characters.

    Returns
    -------
    The formatted string.
    """
    if not items :
        return '\n'
    matrix, info = compute_item_matrix(items, separator_size=len(separator), displaywidth=displaywidth)
    fmatrix = [filter(None, x) for x in matrix]
    sjoin = lambda x : separator.join([ y.ljust(w, ' ') for y, w in zip(x, info['columns_width'])])
    return '\n'.join(map(sjoin, fmatrix))+'\n'
def columnize(items, separator='  ', displaywidth=80):
    """ Transform a list of strings into a single string with columns.

    Parameters
    ----------
    items : sequence of strings
        The strings to process.

    separator : str, optional [default is two spaces]
        The string that separates columns.

    displaywidth : int, optional [default is 80]
        Width of the display in number of characters.

    Returns
    -------
    The formatted string.
    """
    if not items :
        return '\n'
    matrix, info = compute_item_matrix(items, separator_size=len(separator), displaywidth=displaywidth)
    fmatrix = [filter(None, x) for x in matrix]
    sjoin = lambda x : separator.join([ y.ljust(w, ' ') for y, w in zip(x, info['columns_width'])])
    return '\n'.join(map(sjoin, fmatrix))+'\n'
def columnize ( items , separator = '  ' , displaywidth = 80 ) : if not items : return '\n' matrix , info = compute_item_matrix ( items , separator_size = len ( separator ) , displaywidth = displaywidth ) fmatrix = [ filter ( None , x ) for x in matrix ] sjoin = lambda x : separator . join ( [ y . ljust ( w , ' ' ) for y , w in zip ( x , info [ 'columns_width' ] ) ] ) return '\n' . join ( map ( sjoin , fmatrix ) ) + '\n'
Transform a list of strings into a single string with columns.

    Parameters
    ----------
    items : sequence of strings
        The strings to process.

    separator : str, optional [default is two spaces]
        The string that separates columns.

    displaywidth : int, optional [default is 80]
        Width of the display in number of characters.

    Returns
    -------
    The formatted string.
Transform a list of strings into a single string with columns .