#NEWLINE# def render( self ) : #NEWLINE# #INDENT# '\n        Renders table to output.\n\n        Example:\n\n        +---------------+-----------------------+------------------+\n        | ISBN          | Title                 | Author           |\n        +---------------+-----------------------+------------------+\n        | 99921-58-10-7 | Divine Comedy         | Dante Alighieri  |\n        | 9971-5-0210-0 | A Tale of Two Cities  | Charles Dickens  |\n        | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |\n        +---------------+-----------------------+------------------+\n        ' #NEWLINE# self . _calculate_number_of_columns ( ) #NEWLINE# rows = self . _build_table_rows ( self . _rows ) #NEWLINE# headers = self . _build_table_rows ( self . _headers ) #NEWLINE# self . _calculate_columns_width ( ( headers + rows ) ) #NEWLINE# self . _render_row_separator ( ) #NEWLINE# if headers : #NEWLINE# #INDENT# for header in headers : #NEWLINE# #INDENT# self . _render_row ( header , self . _style . cell_header_format ) #NEWLINE# self . _render_row_separator ( ) #NEWLINE# #UNINDENT# #UNINDENT# for row in rows : #NEWLINE# #INDENT# if isinstance ( row , TableSeparator ) : #NEWLINE# #INDENT# self . _render_row_separator ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _render_row ( header , self . _style . cell_row_format ) #NEWLINE# #UNINDENT# #UNINDENT# if rows : #NEWLINE# #INDENT# self . _render_row_separator ( ) #NEWLINE# #UNINDENT# self . _cleanup ( )