Skip to content

Instantly share code, notes, and snippets.

@heathhenley
heathhenley / ansistrm.py
Created November 20, 2018 21:36 — forked from vsajip/ansistrm.py
Python logging: colourising terminal output
#
# Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license.
#
import ctypes
import logging
import os
class ColorizingStreamHandler(logging.StreamHandler):
# color names to indices
color_map = {