我们从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")