1
0
Fork 0
Find a file
Daniel Baumann 17a63ee7d5
Adding upstream version 3.1.10.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-12 13:05:59 +01:00
dead_code Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
docs Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
terminaltables Adding upstream version 3.1.0. 2025-02-12 13:04:33 +01:00
tests Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
.env_example Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
.gitignore Adding upstream version 3.1.0. 2025-02-12 13:04:33 +01:00
build.sh Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
CHANGELOG.md Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
CONTRIBUTING.md Adding upstream version 3.1.0. 2025-02-12 13:04:33 +01:00
example1.py Adding upstream version 3.1.0. 2025-02-12 13:04:33 +01:00
example2.py Adding upstream version 3.1.0. 2025-02-12 13:04:33 +01:00
example3.py Adding upstream version 3.1.0. 2025-02-12 13:04:33 +01:00
LICENSE Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
Pipfile Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
publish.sh Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
pyproject-whl.toml Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
pyproject.toml Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
README.md Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00
tox.ini Adding upstream version 3.1.10. 2025-02-12 13:05:59 +01:00

terminaltables

What is it

Easily draw tables in terminal/console applications from a list of lists of strings. Supports multi-line rows.

  • Python 2.6, 2.7, PyPy, PyPy3, 3.3, 3.4, and 3.5+ supported on Linux and OS X.
  • Python 2.7, 3.3, 3.4, and 3.5+ supported on Windows (both 32 and 64 bit versions of Python).

📖 Full documentation: https://robpol86.github.io/terminaltables

Quickstart

Install:

pip install terminaltables

Usage:

from terminaltables import AsciiTable

table_data = [
    ['Heading1', 'Heading2'],
    ['row1 column1', 'row1 column2'],
    ['row2 column1', 'row2 column2'],
    ['row3 column1', 'row3 column2']
]
table = AsciiTable(table_data)
print
table.table
+--------------+--------------+
| Heading1     | Heading2     |
+--------------+--------------+
| row1 column1 | row1 column2 |
| row2 column1 | row2 column2 |
| row3 column1 | row3 column2 |
+--------------+--------------+

Example Implementations

Example Scripts Screenshot

Source code for examples:

Change Log