def as_table(tlv, title=None, redact=False):
res = [['Tag', 'Name', 'Value']]
for tag, value in tlv.items():
res.append([format_bytes(tag.id),
tag.name or '',
'\n'.join(textwrap.wrap(render_element(tag, value, redact=redact), 80))])
table = SingleTable(res)
if title is not None:
table.title = title
return table.table
# Function called by the emvtool shim installed by setuptools
评论列表
文章目录