MCPcopy Create free account
hub / github.com/dabeaz-course/practical-python / TextTableFormatter

Class TextTableFormatter

Solutions/7_9/tableformat.py:16–29  ·  view source on GitHub ↗

Output data in plain-text format.

Source from the content-addressed store, hash-verified

14 raise NotImplementedError()
15
16class 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
31class CSVTableFormatter(TableFormatter):
32 '''

Callers 1

create_formatterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected