Skip to content

Instantly share code, notes, and snippets.

@tylerbutler
tylerbutler / ansistrm.py
Created June 2, 2012 21:52 — 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 = {