How to use the texttable.get_color_string function in texttable

To help you get started, we’ve selected a few texttable 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 grow / grow / grow / deployments / tests.py View on Github external
def print_results(results):
    for message in results.test_results:
        if message.result == messages.Result.PASS:
            color = texttable.bcolors.GREEN
        elif message.result == messages.Result.FAIL:
            color = texttable.bcolors.GREEN
        else:
            color = texttable.bcolors.YELLOW
        label = texttable.get_color_string(color, message.result)
        logging.info('{} {}'.format(label, message.title))
github grow / grow / grow / deployments / indexes.py View on Github external
    @classmethod
    def _make_diff_row(cls, color, label, message):
        label = texttable.get_color_string(color, label)
        path = texttable.get_color_string(
            texttable.bcolors.WHITE, message.path)
        formatted_author = cls._format_author(message.deployed_by, True)
        deployed = str(message.deployed).split('.')[0][
            :-3] if message.deployed else ''
        return [label, path, deployed, formatted_author]
github grow / grow / grow / deployments / indexes.py View on Github external
    @classmethod
    def _make_diff_row(cls, color, label, message):
        label = texttable.get_color_string(color, label)
        path = texttable.get_color_string(
            texttable.bcolors.WHITE, message.path)
        formatted_author = cls._format_author(message.deployed_by, True)
        deployed = str(message.deployed).split('.')[0][
            :-3] if message.deployed else ''
        return [label, path, deployed, formatted_author]