Terminal print strings in columns
Project description
column_print.py
A simple way to print short strings to a terminal in columns.
Unlike many similar utilities, it is NOT necessary for the strings to be in a list before printing. column_print can print any sequence of strings without knowing the length or number of strings in advance.
ColumnPrinter
A context manager class to print successive print statements in columns.
Example Usage:
from modules.column_print import ColumnPrinter
with ColumnPrinter(2, 80) as cp:
cp("Hello")
cp("World")
Prints:
Hello World
Goodbye Moon
print_list
A function to print a list of items in columns.
Example usage:
from modules.column_print import ColumnPrinter
with ColumnPrinter(2, 80) as cp:
cp.print_list(mylist)
Supported Platforms:
- Linux (Windows and macOS to be added)
- Python 3.6 or Later
Developing column_printer
To install column_printer, along with the tools you need to develop, test, and document, run the following in your virtualenv:
$ pip install -e .[dev]
or, using pipenv:
$ pipenv install -e .
See also TODO.txt
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
column_print-0.1.0.tar.gz
(19.3 kB
view hashes)
Built Distribution
Close
Hashes for column_print-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf6e5ea00193bb16d6627f2da4baecddffd6482c6d39f4959aefeff5210b0fb2 |
|
MD5 | 50369b6b7dac3240ac3084b1acc4702f |
|
BLAKE2b-256 | b2325e676b085c68363b802c63aac0b58300d860336f19970c331ebafcc0fb70 |