table_core.border table_core.cell_props
API Reference Manual  /  Python API  /  table  / 

table_core.cell

Name

table_core.cell

Synopsis

Python

import table_core.cell

class table_core.cell.Cell

Synopsis

class table_core.cell.Cell(s, props, override_alignment=None)

Description

Representation of all cells, converted to strings. Handles new-line characters in the input string and converts these to multiple lines instead. If lines are longer than a certain max_width, long lines are wrapped into multiple lines. All strings are represented as unidecoded utf-8 strings to properly handle strange characters.

table_core.cell.Cell.max_len

Synopsis

table_core.cell.Cell.max_len()

Description

string length of the longest string

table_core.cell.Cell.narrow_width

Synopsis

table_core.cell.Cell.narrow_width(max_width, force_max_width)

Description

Try to make the cells row fit within max_width, by creating multiple lines. If force_max_width is False, we allow a delimiter character to included on the same line even if this makes the line one character longer than max_width

table_core.cell.Cell.num_lines

Synopsis

table_core.cell.Cell.num_lines()

Description

number of lines the string represents

table_core.border table_core.cell_props