Python colorama.Fore 模块,LIGHTCYAN_EX 实例源码
我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用colorama.Fore.LIGHTCYAN_EX。
def c_help(*args):
print(Fore.LIGHTCYAN_EX + 'Command help args={}'.format(args))
print("command | description | usage")
print("---------------------------------------------------------------------")
commands = {"run", "devices", "kw"}
for command in commands:
if command == 'run':
print("run | run cases | run file_name")
elif command == 'devices':
print("devices | list all target devices | devices")
elif command == 'kw':
print("kw | run case use kw | kw kw_name args")
def c_start_test(file_name):
print(Fore.LIGHTCYAN_EX + 'Command run file_name={}'.format(file_name))
tester.execute_script(file_name)
def c_devices():
devices = tester.devices()
if len(devices) > 0:
for device in devices:
print(Fore.LIGHTCYAN_EX + 'List of devices registered:')
print(device + " device")
else:
print(Fore.LIGHTCYAN_EX + 'There is no registered devices.')
def c_execute_kw_line(kw_name, *args):
print(Fore.LIGHTCYAN_EX + 'Command kw name={} args={}'.format(kw_name, args))
tester.execute_line(kw_name.lower(), *args)
def on_ready():
thread.do_run = False
thread.join()
print("\nStarted " + Fore.LIGHTCYAN_EX + "colorme.")
print('Logged in as')
print(bot.user.name.encode("ascii", "backslashreplace").decode())
print(bot.user.id)
print('------')
bot.remove_command("help")
bot.remove_command("HelpFormatter")
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。