diff --git a/README.md b/README.md index a67f5c2..5f35257 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ Hosted at Read The Docs: [tableprint.readthedocs.org](http://tableprint.readthed - `numpy` ## Version +- 0.4.0 (May 3 2016) Adds a 'block' style - 0.3.2 (May 3 2016) Adds a test suite - 0.3.0 (May 3 2016) Adds custom styles for tables, specified by a key ('fancy_grid', 'grid', etc.) - 0.2.0 (May 2 2016) Adds better python2 (unicode/bytes) compatibility diff --git a/tableprint.py b/tableprint.py index 131993d..9423603 100644 --- a/tableprint.py +++ b/tableprint.py @@ -18,7 +18,7 @@ import sys import numpy as np __all__ = ['table', 'header', 'row', 'hr', 'top', 'bottom', 'banner', 'dataframe', 'humantime'] -__version__ = '0.3.2' +__version__ = '0.4.0' # set up table styles LineStyle = namedtuple('LineStyle', ('begin', 'hline', 'sep', 'end')) @@ -54,6 +54,12 @@ DEFAULT_STYLES = { bottom=LineStyle("╘", "═", "╧", "╛"), row=LineStyle('│', '', '│', '│'), ), + 'block': TableStyle( + top=LineStyle('◢', '■', '■', '◣'), + below_header=LineStyle(' ', '━', '━', ' '), + bottom=LineStyle('◥', '■', '■', '◤'), + row=LineStyle(' ', '', ' ', ' '), + ), } STYLE = 'round' WIDTH = 11