How to use the pytablewriter.writer._common.import_error_msg_template.format function in pytablewriter

To help you get started, we’ve selected a few pytablewriter 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 thombashi / pytablewriter / pytablewriter / writer / binary / _excel.py View on Github external
def __get_cell_style(self, col):
        try:
            import xlwt
        except ImportError:
            warnings.warn(import_error_msg_template.format("excel"))
            raise

        if col in self.__col_style_table:
            return self.__col_style_table.get(col)

        try:
            col_dp = self._column_dp_list[col]
        except KeyError:
            return {}

        if col_dp.typecode not in [typepy.Typecode.REAL_NUMBER]:
            raise ValueError()

        if not Integer(col_dp.minmax_decimal_places.max_value).is_type():
            raise ValueError()
github thombashi / pytablewriter / pytablewriter / writer / text / _html.py View on Github external
def _get_tags_module():
    try:
        from dominate import tags

        return tags
    except ImportError:
        warnings.warn(import_error_msg_template.format("html"))
        raise
github thombashi / pytablewriter / pytablewriter / writer / binary / _excel_workbook.py View on Github external
def open(self, file_path):
        try:
            import xlwt
        except ImportError:
            warnings.warn(import_error_msg_template.format("excel"))
            raise

        self._workbook = xlwt.Workbook()