Output data in plain-text format.
| 14 | raise NotImplementedError() |
| 15 | |
| 16 | class TextTableFormatter(TableFormatter): |
| 17 | ''' |
| 18 | Output data in plain-text format. |
| 19 | ''' |
| 20 | def headings(self, headers): |
| 21 | for h in headers: |
| 22 | print(f'{h:>10s}', end=' ') |
| 23 | print() |
| 24 | print(('-'*10 + ' ')*len(headers)) |
| 25 | |
| 26 | def row(self, rowdata): |
| 27 | for d in rowdata: |
| 28 | print(f'{d:>10s}', end=' ') |
| 29 | print() |
| 30 | |
| 31 | class CSVTableFormatter(TableFormatter): |
| 32 | ''' |