Initial commit
This commit is contained in:
11
Solutions/9_4/structly/tableformat/formats/text.py
Normal file
11
Solutions/9_4/structly/tableformat/formats/text.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# text.py
|
||||
|
||||
from ..formatter import TableFormatter
|
||||
|
||||
class TextTableFormatter(TableFormatter):
|
||||
def headings(self, headers):
|
||||
print(' '.join('%10s' % h for h in headers))
|
||||
print(('-'*10 + ' ')*len(headers))
|
||||
|
||||
def row(self, rowdata):
|
||||
print(' '.join('%10s' % d for d in rowdata))
|
||||
Reference in New Issue
Block a user