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.10.tar.gz
(12.3 kB
view hashes)
Built Distribution
Close
Hashes for terminaltables-3.1.10-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4fdc4179c9e4aab5f674d80f09d76fa436b96fdc698a8505e0a36bf0804a874 |
|
MD5 | 6f125645c5a6766fa3fc01859d4a2514 |
|
BLAKE2b-256 | c4fbea621e0a19733e01fe4005d46087d383693c0f4a8f824b47d8d4122c87e0 |