Generate simple tables in terminals from a nested list of strings.
Project description
terminaltables
Forked because original project's repo is ARCHIVED and there are no wheels for the old project in pypi.
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:
example1.py
example2.py <https://github.com/Robpol86/terminaltables/blob/master/example2.py>
, and
example3.py <https://github.com/Robpol86/terminaltables/blob/master/example3.py>
.. changelog-section-start
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.7.tar.gz
(12.4 kB
view hashes)
Built Distribution
Close
Hashes for terminaltables-3.1.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18ba14fdfbc6a6d7dcf65aa0871a5dbea81d7d324ecfad8dc8c2f94b3efb4f2e |
|
MD5 | ed7d6972c820cb9af53e034e4a4ecd6f |
|
BLAKE2b-256 | 1ed0663ada6aea1ed17d9b9c22a896d1fbecfff24c4e0abe6e7e212443b12499 |