<s> from . . exceptions import CleoException <EOL> class TableStyle ( object ) : <EOL> padding_char = '<STR_LIT:U+0020>' <EOL> horizontal_border_char = '<STR_LIT:->' <EOL> vertical_border_char = '<STR_LIT:|>' <EOL> crossing_char = '<STR_LIT:+>' <EOL> cell_header_format = '<STR_LIT>' <EOL> cell_row_format = '<STR_LIT:%s>' <EOL> cell_row_content_format = '<STR_LIT>' <EOL> border_format = '<STR_LIT:%s>' <EOL> pad_type = '<STR_LIT>' <EOL> def set_padding_char ( self , padding_char ) : <EOL> if not padding_char : <EOL> raise CleoException ( '<STR_LIT>' ) <EOL> self . padding_char = padding_char <EOL> return self <EOL> def set_horizontal_border_char ( self , horizontal_border_char ) : <EOL> self . horizontal_border_char = horizontal_border_char <EOL> return self <EOL> def set_vertical_border_char ( self , vertical_border_char ) : <EOL> self . vertical_border_char = vertical_border_char <EOL> return self <EOL> def set_crossing_char ( self , crossing_char ) : <EOL> self . crossing_char = crossing_char <EOL> return self <EOL> def set_cell_header_format ( self , cell_header_format ) : <EOL> self . cell_header_format = cell_header_format <EOL> return self <EOL> def set_cell_row_format ( self , cell_row_format ) : <EOL> self . cell_row_format = cell_row_format <EOL> return self <EOL> def set_cell_row_content_format ( self , cell_row_content_format ) : <EOL> self . cell_row_content_format = cell_row_content_format <EOL> return self <EOL> def set_border_format ( self , border_format ) : <EOL> self . border_format = border_format <EOL> return self <EOL> def set_pad_type ( self , pad_type ) : <EOL> pad_types = { <EOL> '<STR_LIT:left>' : '<STR_LIT>' , <EOL> '<STR_LIT:right>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> if pad_type not in pad_types : <EOL> raise CleoException ( '<STR_LIT>' ) <EOL> self . pad_type = pad_types [ pad_type ] <EOL> return self </s>
