How to use the beautifultable.helpers.BTColumnCollection function in beautifultable

To help you get started, we’ve selected a few beautifultable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
    @deprecated("1.0.0", "1.2.0", BTColumnCollection.padding_left.fget)
    def left_padding_widths(self):  # pragma: no cover
        return self.columns.padding_left
github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
    @deprecated("1.0.0", "1.2.0", BTColumnCollection.padding.fget)
    def set_padding_widths(self, pad_width):  # pragma: no cover
        self.columns.padding_left = pad_width
        self.columns.padding_right = pad_width
github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
        BTColumnCollection.__getitem__,
        details="Use 'BeautifulTable.{columns|rows}[key]' instead.",
    )
    def __getitem__(self, key):  # pragma: no cover
        if isinstance(key, basestring):
            return self.columns[key]
        return self.rows[key]
github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
    @deprecated("1.0.0", "1.2.0", BTColumnCollection.default_padding.fget)
    def default_padding(self):  # pragma: no cover
        return self.columns.default_padding
github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
    @deprecated("1.0.0", "1.2.0", BTColumnCollection.width.fget)
    def column_widths(self):  # pragma: no cover
        return self.columns.width
github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
        BTColumnCollection.__contains__,
        details="Use ''value' in BeautifulTable.{columns|rows}' instead.",
    )
    def __contains__(self, key):  # pragma: no cover
        if isinstance(key, basestring):
            return key in self.columns
        elif isinstance(key, Iterable):
            return key in self.rows
        else:
            raise TypeError(
                ("'key' must be str or Iterable, " "not {}").format(
                    type(key).__name__
                )
github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
    @deprecated("1.0.0", "1.2.0", BTColumnCollection.default_alignment.fget)
    def default_alignment(self):  # pragma: no cover
        return self.columns.default_alignment
github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
if kwargs["sign_mode"] is not None:
            sign = kwargs["sign_mode"]

        self.precision = precision
        self._serialno = serialno
        self._serialno_header = serialno_header
        self.detect_numerics = detect_numerics

        self._sign = sign
        self.maxwidth = maxwidth

        self._ncol = 0
        self._data = BTTableData(self)

        self.rows = BTRowCollection(self)
        self.columns = BTColumnCollection(
            self, default_alignment, default_padding
        )

        self._header_separator = ""
        self._header_junction = ""
        self._column_separator = ""
        self._row_separator = ""
        self.border = ""
        self.set_style(enums.STYLE_DEFAULT)
github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
    @deprecated("1.0.0", "1.2.0", BTColumnCollection.header.fget)
    def column_headers(self):  # pragma: no cover
        return self.columns.header