#NEWLINE# def _make_fixed_width( strings , justify = 'right' , minimum = None , adj = None ) : #NEWLINE# #INDENT# if ( ( len ( strings ) == 0 ) or ( justify == 'all' ) ) : #NEWLINE# #INDENT# return strings #NEWLINE# #UNINDENT# if ( adj is None ) : #NEWLINE# #INDENT# adj = _get_adjustment ( ) #NEWLINE# #UNINDENT# max_len = np . max ( [ adj . len ( x ) for x in strings ] ) #NEWLINE# if ( minimum is not None ) : #NEWLINE# #INDENT# max_len = max ( just , max_len ) #NEWLINE# #UNINDENT# conf_max = get_option ( 'display.max_colwidth' ) #NEWLINE# if ( ( conf_max is not None ) and ( max_len > conf_max ) ) : #NEWLINE# #INDENT# max_len = conf_max #NEWLINE# #UNINDENT# def just( x ) : #NEWLINE# #INDENT# if ( conf_max is not None ) : #NEWLINE# #INDENT# if ( ( conf_max > 3 ) & ( adj . len ( x ) > max_len ) ) : #NEWLINE# #INDENT# x = ( x [ : ( max_len - 3 ) ] + '...' ) #NEWLINE# #UNINDENT# #UNINDENT# return x #NEWLINE# #UNINDENT# strings = [ just ( x ) for x in strings ] #NEWLINE# result = adj . justify ( strings , max_len , mode = justify ) #NEWLINE# return result