MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / print_plain_table

Function print_plain_table

unity_cli/cli/output.py:173–185  ·  view source on GitHub ↗

Print a tab-separated table for pipe-friendly output.

(
    headers: list[str],
    rows: list[list[str]],
    title: str | None = None,
    header: bool = True,
)

Source from the content-addressed store, hash-verified

171
172
173def print_plain_table(
174 headers: list[str],
175 rows: list[list[str]],
176 title: str | None = None,
177 header: bool = True,
178) -> None:
179 """Print a tab-separated table for pipe-friendly output."""
180 if title:
181 print(title)
182 if header:
183 print("\t".join(headers))
184 for row in rows:
185 print("\t".join(sanitize_tsv("" if cell is None else str(cell)) for cell in row))
186
187
188# Keep alias for backward compatibility

Calls 1

sanitize_tsvFunction · 0.85