Exemplo n.º 1
0
def columnWrite(*cols):
    '''Display data by columns

    Parameters:
    cols     list(tuple(text,width))

    Example: columnWrite( "Some text", 10, "Next column", 20 )
    '''
    colWidth = list(islice(cols,1,None,2))
    for line in map(lambda x:izip_longest(colWidth,x),columnMatrix(*cols)):
        for width,s in line:
            cl_overriding.printSUCCESS(("{0:%d} "%(width or 1)).format(s),
                printBR=False)
        cl_overriding.printSUCCESS("",printBR=True)
Exemplo n.º 2
0
 def printFunc(self,s):
     """
     Overriding print
     """
     cl_overriding.printSUCCESS(s)