Skip to content

Support large tables in output #64

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Generate data (e.g 2.9 million rows)
2. Load into PrettyTable using add_row()
3. Print the table

Example:

table_columns = ['file id', 'parent directory (directory id)', 'file name', 
'type', 'extra info']
display_table = PrettyTable(table_columns)
for file_data in file_query():  # this could also be the db_cursor variant
     display_table.addrow([file_data[0], file_data[1], file_data[2], file_data[3], file_data[4]])

print(display_table)


What is the expected output? What do you see instead?

expect that the table gets displayed
instead, it crashes on a memory compliant as PrettyTable tries to convert 
itself into a one big string


What version of the product are you using? On what operating system?

Linux (Kubuntu 14.10), Python 2.7, prettytable 0.7.2

Please provide any additional information below.

Original issue reported on code.google.com by gpcl...@gmail.com on 15 Dec 2014 at 5:02

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions