python 定义颜色函数
来源:互联网 发布:约瑟夫环数组实现 编辑:程序博客网 时间:2024/06/11 04:15
defcolor_print(msg,color='red'):
"""
Print colorful string.
颜色打印字符或者退出
"""
color_msg = {'blue':'\033[1;36m%s\033[0m',
'green':'\033[1;32m%s\033[0m',
'yellow':'\033[1;33m%s\033[0m',
'red':'\033[1;31m%s\033[0m',
'title':'\033[30;42m%s\033[0m',
'info':'\033[32m%s\033[0m'}
msg = color_msg.get(color,'red') % msg
print(msg)
0 0
- python 定义颜色函数
- python 条件定义函数
- Python function 函数定义
- python 定义函数
- Python函数定义
- Python定义函数
- python的函数定义
- Python -定义函数
- python 函数定义
- python函数定义
- python函数定义
- Python—定义函数
- Python函数定义global
- python 函数定义
- Python 函数定义
- Python 函数定义,使用
- Python 函数定义练习
- python定义函数
- <转>逻辑回归LR的特征为什么要先离散化
- springMVC对简单对象、Set、List、Map的数据绑定和常见问题(一)
- Windows下搭建NodeJS绿色版开发环境
- asreml安装Linux服务器版时获得硬件和软件信息
- Java nio 聊天室
- python 定义颜色函数
- springMVC对简单对象、Set、List、Map的数据绑定和常见问题(二)
- ReactNative入门之ListView使用透析
- 文章标题
- Java基于socket服务实现UDP协议的方法
- springMVC对简单对象、Set、List、Map的数据绑定和常见问题(三)
- 安卓ScrollView中嵌套 GridView 导致 ScrollView默认不停留在顶部的解决方案
- Git安装和使用
- 【踩坑】如何获得Toolbar上原生的返回按钮