How to use the pyexcelerate.Utility function in PyExcelerate

To help you get started, we’ve selected a few PyExcelerate 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 kz26 / PyExcelerate / pyexcelerate / Border.py View on Github external
def color(self, value):
        Utility.lazy_set(self, '_color', None, value)
github kz26 / PyExcelerate / pyexcelerate / Workbook.py View on Github external
for attr, attr_id in Workbook.STYLE_ATTRIBUTE_MAP.items():
                obj = getattr(style, attr_id)
                if obj and not obj.is_default:  # we only care about it if it's not default
                    items[attr][obj] = items[attr].get(obj,
                                                       len(items[attr]) + 1)
                    obj.id = items[attr][obj]  # apply
        for k, v in items.items():
            # ensure it's sorted properly
            items[k] = [
                tup[0] for tup in sorted(v.items(), key=lambda x: x[1])
            ]
        self._items = items
        self._styles = [
            tup[0] for tup in sorted(styles.items(), key=lambda x: x[1])
        ]
        Utility.YOLO = False