Closed psads-git closed 1 year ago
I just checked, it works on Linux too.
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tabulate import tabulate
>>> table = [["spam",42],["eggs",451],["bacon",0]]
"item">>> headers = ["item", "qty"]
>>> print(tabulate(table, headers, tablefmt="simple_grid"))
┌────────┬───────┐
│ item │ qty │
├────────┼───────┤
│ spam │ 42 │
├────────┼───────┤
│ eggs │ 451 │
├────────┼───────┤
│ bacon │ 0 │
└────────┴───────┘
>>> import tabulate as t
>>> t.__version__
'0.9.0'
Please note that simple_grid
was added after 0.8.10. So unless you're using the git version, 0.9.0 is the first public PyPI release which supports it.
Take the following code:
Its output is:
when it should be: