更改外壳文本颜色(Windows) [英] Changing Shell Text Color (Windows)

查看:69
本文介绍了更改外壳文本颜色(Windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种在运行时更改python脚本输出的文本颜色的方法。基本思想是这样的:

I'm looking for a way to change the color of the text output from my python scripts as it runs. The basic idea is something like this:

if (Data < LowerLimit):
    print "Failed" # Output Failed as Red Text
elif (Data > UpperLimit):
    print "Failed" # Red Color
else:
    print "Passed" # Blue Color

脚本正在Windows计算机上用于快速数据分析。

The scripts are being used on windows machines for quick data analysis.

推荐答案

或者关于我发现的最佳模块
http://pypi.python .org / pypi / colorama

Or about the best module I have found http://pypi.python.org/pypi/colorama

这篇关于更改外壳文本颜色(Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆