本文整理汇总了Python中colorama.Fore.LIGHTCYAN_EX属性的典型用法代码示例。如果您正苦于以下问题:Python Fore.LIGHTCYAN_EX属性的具体用法?Python Fore.LIGHTCYAN_EX怎么用?Python Fore.LIGHTCYAN_EX使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类colorama.Fore
的用法示例。
在下文中一共展示了Fore.LIGHTCYAN_EX属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTCYAN_EX [as 别名]
def main():
try:
print(Fore.WHITE)
log("App starting up...")
show_header()
load_rolls()
show_leaderboard()
player1, player2 = get_players()
log(f"{player1} has logged in.")
play_game(player1, player2)
log("Game over.")
except json.decoder.JSONDecodeError as je:
print()
print(Fore.LIGHTRED_EX + "ERROR: The file rolls.json is invalid JSON." + Fore.WHITE)
print(Fore.LIGHTRED_EX + f"ERROR: {je}" + Fore.WHITE)
except FileNotFoundError as fe:
print()
print(Fore.LIGHTRED_EX + "ERROR: Rolls file not found" + Fore.WHITE)
print(Fore.LIGHTRED_EX + f"ERROR: {fe}" + Fore.WHITE)
except KeyboardInterrupt:
print()
print(Fore.LIGHTCYAN_EX + "You gotta run? Ok, cya next time!" + Fore.WHITE)
except Exception as x:
print(Fore.LIGHTRED_EX + f"Unknown error: {x}" + Fore.WHITE)
示例2: do_banner
# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTCYAN_EX [as 别名]
def do_banner(self, args):
"""Print WebPocket banner"""
ascii_text = text2art("WebPocket", "rand")
self.poutput("\n\n")
self.poutput(ascii_text, '\n\n', color=Fore.LIGHTCYAN_EX)
self.poutput("{art} WebPocket has {count} modules".format(art=art("inlove"), count=self.get_module_count()), "\n\n", color=Fore.MAGENTA)
示例3: result_collector
# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTCYAN_EX [as 别名]
def result_collector(result_queue):
"""Collect and display results."""
def notename(n, space):
if space:
return [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' '][n % 12]
return [
Fore.BLUE + 'A' + Style.RESET_ALL,
Fore.LIGHTBLUE_EX + 'A#' + Style.RESET_ALL,
Fore.GREEN + 'B' + Style.RESET_ALL,
Fore.CYAN + 'C' + Style.RESET_ALL,
Fore.LIGHTCYAN_EX + 'C#' + Style.RESET_ALL,
Fore.RED + 'D' + Style.RESET_ALL,
Fore.LIGHTRED_EX + 'D#' + Style.RESET_ALL,
Fore.YELLOW + 'E' + Style.RESET_ALL,
Fore.WHITE + 'F' + Style.RESET_ALL,
Fore.LIGHTBLACK_EX + 'F#' + Style.RESET_ALL,
Fore.MAGENTA + 'G' + Style.RESET_ALL,
Fore.LIGHTMAGENTA_EX + 'G#' + Style.RESET_ALL,
][n % 12] #+ str(n//12)
print('Listening to results..')
# TODO(mtyka) Ensure serial stitching of results (no guarantee that
# the blocks come in in order but they are all timestamped)
while True:
result = result_queue.get()
serial = result.audio_chunk.serial
result_roll = result.result
if serial > 0:
result_roll = result_roll[4:]
for notes in result_roll:
for i in range(6, len(notes) - 6):
note = notes[i]
is_frame = note[0] > 0.0
notestr = notename(i, not is_frame)
print(notestr, end='')
print('|')
示例4: print_help
# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTCYAN_EX [as 别名]
def print_help():
terminal(CMD_CLEAR_TERM)
print(Fore.LIGHTGREEN_EX + 'PROX v0.2 - Utility for checking proxy in terminal')
print(Fore.LIGHTGREEN_EX + 'Authors: Hasanov Abdurahmon & Ilyosiddin Kalandar')
print(Fore.LIGHTCYAN_EX)
print('Usage -> prox -f <filename> - Check file with proxies')
print('prox -p <proxy> - check only one proxy')
print('prox --help - show this menu')
示例5: info
# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTCYAN_EX [as 别名]
def info(line):
print(Fore.LIGHTCYAN_EX + line + Style.RESET_ALL)
示例6: disass_instruction
# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTCYAN_EX [as 别名]
def disass_instruction(uc, instr, addr_alias="", columns=False):
if instr.id == 0:
pass
(regs_read, regs_write) = instr.regs_access()
reg_values = {}
for r in regs_read:
uc_constant = getattr(unicorn.x86_const, f"UC_X86_REG_{instr.reg_name(r).upper()}", None)
if uc_constant:
reg_values[instr.reg_name(r)] = uc.reg_read(uc_constant)
reg_values_str = ' '.join([f"{name}=0x{value:02x}" for name, value in reg_values.items()])
if X86_GRP_JUMP in instr.groups:
if jump_taken(uc, instr):
color = Fore.LIGHTGREEN_EX
comment = f"; taken! {reg_values_str}"
else:
color = Fore.LIGHTRED_EX
comment = f"; not taken! {reg_values_str}"
else:
color = Fore.RESET
comment = f"; {reg_values_str}" if reg_values_str else ""
mnemonic = f"{color}{instr.mnemonic}{Fore.RESET}"
addr_alias = f"0x{instr.address:02x}, {Fore.LIGHTRED_EX}{addr_alias}{Fore.RESET}" if addr_alias \
else f"0x{instr.address:02x}"
disass_cols = f">>> {addr_alias}:", f"{mnemonic} {Fore.LIGHTCYAN_EX}{instr.op_str}{Fore.RESET}", f"{Fore.LIGHTBLUE_EX}{comment}{Fore.RESET}"
if columns:
return disass_cols
return " ".join(disass_cols)
示例7: print_choice
# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTCYAN_EX [as 别名]
def print_choice(beg, end, SONG_INFO, type):
"""Print the available choices."""
# Check if end is more than length of SONG_INFO
if end > len(SONG_INFO):
end = len(SONG_INFO)
while beg != end:
print(Fore.LIGHTMAGENTA_EX, end='')
print(' [' + str(beg+1) + '] ', end='')
print(Style.RESET_ALL, end='')
print(Fore.LIGHTCYAN_EX, end='')
if type == 'metadata':
print(SONG_INFO[beg].track_name, end='')
if type == 'mp3':
print(SONG_INFO[beg]['title'], end='')
print(Style.RESET_ALL, end='')
print(' by ', end='')
print(Fore.YELLOW, end='')
if type == 'metadata':
print(SONG_INFO[beg].artist_name, end='')
if type == 'mp3':
print(SONG_INFO[beg]['author_name'], end='')
print(Style.RESET_ALL, end='')
print(' with dur ', end='')
print(Fore.GREEN, end='')
print("{}".format(SONG_INFO[beg]['duration']), end='')
print(Style.RESET_ALL)
beg += 1
# Before exiting print another choice to show more
if end < len(SONG_INFO):
print(Fore.LIGHTMAGENTA_EX, end='')
print(' [0]', end='')
print(Style.RESET_ALL, end='')
print(Fore.YELLOW, end='')
print(' More results')
print(Style.RESET_ALL, end='')