def color_term(string, color='blue', bold=True):
    u"""Linux客户端彩色输出，适配py2，py3."""
    colors = {'grey': '\x1b[0;30m', 'red': '\x1b[0;31m', 'green':
        '\x1b[0;32m', 'yellow': '\x1b[0;33m', 'blue': '\x1b[0;34m',
        'megenta': '\x1b[0;35m', 'cyan': '\x1b[0;36m', 'white':
        '\x1b[0;37m', 'bold': '\x1b[1m', 'end': '\x1b[0m'}
    color_format = colors[color].replace('[0', '[1') if bold else colors[color]
    return color_format + str(string) + colors['end']
