# Path: simiki/utils.py
# COLOR_CODES = {
#     "reset": "\033[0m",
#     "black": "\033[1;30m",
#     "red": "\033[1;31m",
#     "green": "\033[1;32m",
#     "yellow": "\033[1;33m",
#     "blue": "\033[1;34m",
#     "magenta": "\033[1;35m",
#     "cyan": "\033[1;36m",
#     "white": "\033[1;37m",
#     "bgred": "\033[1;41m",
#     "bggrey": "\033[1;100m",
# }
# def color_msg(color, msg):
# def check_extension(filename):
# def copytree(src, dst, symlinks=False, ignore=None):
# def emptytree(directory, exclude_list=None):
# def mkdir_p(path):
# def listdir_nohidden(path):
# def write_file(filename, content):
# def get_md5(filename):
# def get_dir_md5(dirname):
# def import_string(import_name, silent=False):
# 
# Path: simiki/compat.py



import logging
from logging import getLogger, Formatter, StreamHandler
from simiki import utils
from simiki.compat import is_linux, is_osx

        rln = record.levelname
        if rln in lvl2color:
            return "[{0}]: {1}".format(
                utils.color_msg(lvl2color[rln], rln),
                msg
            )
        else:
            return msg


class NonANSIFormatter(Formatter):
    """Non ANSI color format"""

    def format(self, record):
        try:
            msg = super(NonANSIFormatter, self).format(record)
        except:
            # 2017-05-15: not support py26
            # for python2.6
            # Formatter is old-style class in python2.6 and type is classobj
            # another trick: http://stackoverflow.com/a/18392639/1276501
            msg = Formatter.format(self, record)

        rln = record.levelname
        return "[{0}]: {1}".format(rln, msg)


def _is_platform_allowed_ansi():
    """ansi be used on linux/macos"""

# Path: simiki/utils.py
# COLOR_CODES = {
#     "reset": "\033[0m",
#     "black": "\033[1;30m",
#     "red": "\033[1;31m",
#     "green": "\033[1;32m",
#     "yellow": "\033[1;33m",
#     "blue": "\033[1;34m",
#     "magenta": "\033[1;35m",
#     "cyan": "\033[1;36m",
#     "white": "\033[1;37m",
#     "bgred": "\033[1;41m",
#     "bggrey": "\033[1;100m",
# }
# def color_msg(color, msg):
# def check_extension(filename):
# def copytree(src, dst, symlinks=False, ignore=None):
# def emptytree(directory, exclude_list=None):
# def mkdir_p(path):
# def listdir_nohidden(path):
# def write_file(filename, content):
# def get_md5(filename):
# def get_dir_md5(dirname):
# def import_string(import_name, silent=False):
# 
# Path: simiki/compat.py



# Path: simiki/log.py
import logging
from logging import getLogger, Formatter, StreamHandler
from simiki import utils
from simiki.compat import is_linux, is_osx


        rln = record.levelname
        if rln in lvl2color:
            return "[{0}]: {1}".format(
                utils.color_msg(lvl2color[rln], rln),
                msg
            )
        else:
            return msg


class NonANSIFormatter(Formatter):
    """Non ANSI color format"""

    def format(self, record):
        try:
            msg = super(NonANSIFormatter, self).format(record)
        except:
            # 2017-05-15: not support py26
            # for python2.6
            # Formatter is old-style class in python2.6 and type is classobj
            # another trick: http://stackoverflow.com/a/18392639/1276501
            msg = Formatter.format(self, record)

        rln = record.levelname
        return "[{0}]: {1}".format(rln, msg)


def _is_platform_allowed_ansi():
    """ansi be used on linux/macos"""

    if is_linux or is_osx: