Author: bugman Date: Thu Mar 7 18:39:22 2013 New Revision: 18683 URL: http://svn.gna.org/viewcvs/relax?rev=18683&view=rev Log: Fix for the lib.text.table.format_table() function - the column width calculation was broken. Modified: trunk/lib/text/table.py Modified: trunk/lib/text/table.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/text/table.py?rev=18683&r1=18682&r2=18683&view=diff ============================================================================== --- trunk/lib/text/table.py (original) +++ trunk/lib/text/table.py Thu Mar 7 18:39:22 2013 @@ -107,7 +107,7 @@ for j in range(num_cols): # The element is larger than the previous. if len(headings[i][j]) > widths[j]: - widths.append(len(headings[i][j])) + widths[j] = len(headings[i][j]) for i in range(num_rows): for j in range(num_cols): # The element is larger than the previous. @@ -122,7 +122,7 @@ if max_width: free_space = max_width - used else: - free_space = 1e10 + free_space = 1000 # The maximal width for all cells. free_width = sum(widths)