trepan/lib/pp.py
def pprint_simple_array(val, displaywidth, msg_nocr, msg, lineprefix=''):
    '''Try to pretty print a simple case where a list is not nested.
    Return True if we can do it and False if not. '''

    if type(val) != list:
        return False

    numeric = True
    for i in range(len(val)):
        if not (type(val[i]) in [bool, float, int]):
            numeric = False
            if not (type(val[i]) in [bool, float, int, bytes]):
                return False
            pass
        pass
    mess = columnize([repr(v) for v in val],
                     opts={"arrange_array": True,
                           "lineprefix": lineprefix,
                           "displaywidth": int(displaywidth)-3,
                           'ljust': not numeric})
    msg_nocr(mess)
    return True
def pprint_simple_array(val, displaywidth, msg_nocr, msg, lineprefix=''):
    '''Try to pretty print a simple case where a list is not nested.
    Return True if we can do it and False if not. '''

    if type(val) != list:
        return False

    numeric = True
    for i in range(len(val)):
        if not (type(val[i]) in [bool, float, int]):
            numeric = False
            if not (type(val[i]) in [bool, float, int, bytes]):
                return False
            pass
        pass
    mess = columnize([repr(v) for v in val],
                     opts={"arrange_array": True,
                           "lineprefix": lineprefix,
                           "displaywidth": int(displaywidth)-3,
                           'ljust': not numeric})
    msg_nocr(mess)
    return True
def pprint_simple_array ( val , displaywidth , msg_nocr , msg , lineprefix = '' ) : if type ( val ) != list : return False numeric = True for i in range ( len ( val ) ) : if not ( type ( val [ i ] ) in [ bool , float , int ] ) : numeric = False if not ( type ( val [ i ] ) in [ bool , float , int , bytes ] ) : return False pass pass mess = columnize ( [ repr ( v ) for v in val ] , opts = { "arrange_array" : True , "lineprefix" : lineprefix , "displaywidth" : int ( displaywidth ) - 3 , 'ljust' : not numeric } ) msg_nocr ( mess ) return True
Try to pretty print a simple case where a list is not nested.
    Return True if we can do it and False if not.
Try to pretty print a simple case where a list is not nested . Return True if we can do it and False if not .