Adds a 'block' style

This commit is contained in:
Niru Maheswaranathan
2016-05-03 19:25:40 -07:00
parent 4729d2ac32
commit 78b918c4f4
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -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