PrettyTable is a simple Python library designed to make it quick and easy to represent tabular data in visually appealing ASCII tables. It was inspired by the ASCII tables used in the PostgreSQL shell psql. PrettyTable allows for selection of which columns are to be printed, independent alignment of columns (left or right justified or centred) and printing of "sub-tables" by specifying a row range.

PrettyTable has moved!

As of PrettyTable 0.5 (released May 26, 2009), PrettyTable development has moved to a Google code project. All future releases, documentation, etc. will be published at that page and not at this one, so please update your bookmarks! PrettyTable was an unexpected hit and quickly outgrew the sorts of facilities I could easily provide myself. The Google code page features a Wiki for documentation, three "Google groups" (mailing lists, basically) and a web-browsable Subversion repository. Check it out!

Links to old pages associated with PrettyTable 0.1 through 0.4 are maintained below for historical interest.

Old versions / History

PrettyTable 0.4 - May 13, 2009 (Download) (Webpage)

Thanks to Tim Cera, Chris Clark, Alexander Lamaison for suggesting and helping to test many of the new features in this release.

PrettyTable 0.3 - May 01, 2009 (Download) (Webpage)

Thanks to Chris Clark for contributing a patch against 0.2.1 to add this feature!

PrettyTable 0.2.1 - April 29, 2009 (Download) (Webpage)

This is a bug fix release to take care of some serious problems in 0.2, which was obviously released with insufficient testing!

Thanks to Julien Koesten for reporting these bugs and testing the fixes almost immediately after the release of 0.2!

PrettyTable 0.2 - April 29, 2009 (Download) (Webpage)

PrettyTable 0.1 - February 26, 2009 (Download) (Webpage)