Generate simple tables in terminals from a nested list of strings.
Project description
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
Source code for examples:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
terminaltables-3.1.8.tar.gz
(12.3 kB
view hashes)
Built Distribution
Close
Hashes for terminaltables-3.1.8-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 383916b5a203e6ac754ffbc18084a4988ef0746d7d754afd9f1188c3c003e399 |
|
MD5 | dc2413a459d9c990368653eccf31a417 |
|
BLAKE2b-256 | 6f6bad2cbd9bb0341479a5f77f6b97a42792b2fdfc2d33ac07fbbacabaa3c5a3 |