We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What steps will reproduce the problem? import prettytable pt = prettytable.PrettyTable('a b c'.split()) pt.add_row([1,2,3]) pt.add_row([4,5,6]) pt.printt() # Works as expected # Now let's change the headers... pt.field_names = "aaa bbb ccc".split() pt.printt() # oops! # This gets printed: +---+---+---+ | aaa | bbb | ccc | +---+---+---+ | 1 | 2 | 3 | | 4 | 5 | 6 | +---+---+---+ # Setting the headers a second time fixes this issue: pt.field_names = "aaa bbb ccc".split() pt.printt() +-----+-----+-----+ | aaa | bbb | ccc | +-----+-----+-----+ | 1 | 2 | 3 | | 4 | 5 | 6 | +-----+-----+-----+ I believe this happens because self._recompute_widths() is called before setting the new value for _field_names. Tested with: * prettytable SVN revision 36 * Python 2.6
Original issue reported on code.google.com by denilsonsa on 17 Jan 2011 at 5:51
denilsonsa
The text was updated successfully, but these errors were encountered:
Fixed in trunk. Thank you for reporting and sorry for the delay!
Original comment by luke@maurits.id.au on 9 Jul 2011 at 7:50
luke@maurits.id.au
Sorry, something went wrong.
No branches or pull requests
Original issue reported on code.google.com by
denilsonsa
on 17 Jan 2011 at 5:51The text was updated successfully, but these errors were encountered: