#NEWLINE# def convert_table_list_to_str( table ) : #NEWLINE# #INDENT# 'Convert the python list to str for outputing.\n\n    ' #NEWLINE# table_str = '' #NEWLINE# table = copy . deepcopy ( row ) #NEWLINE# for row in table : #NEWLINE# #INDENT# if SEPARATOR_PATTERN . match ( row [ 0 ] ) : #NEWLINE# #INDENT# row [ 0 ] = row [ 0 ] [ 1 : ] #NEWLINE# row_str = '+' #NEWLINE# for col_str in row : #NEWLINE# #INDENT# row_str += ( col_str + '+' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# row_str = '|' #NEWLINE# for col_str in row : #NEWLINE# #INDENT# row_str += ( ( ( ' ' + col_str ) + ' ' ) + '|' ) #NEWLINE# #UNINDENT# #UNINDENT# table_str += ( row_str + '\n' ) #NEWLINE# #UNINDENT# return table_str [ : ( - 1 ) ]