当前位置: 首页>>代码示例>>Python>>正文


Python Fore.LIGHTCYAN_EX属性代码示例

本文整理汇总了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) 
开发者ID:talkpython,项目名称:python-for-absolute-beginners-course,代码行数:29,代码来源:rpsgame.py

示例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) 
开发者ID:TuuuNya,项目名称:WebPocket,代码行数:8,代码来源:Pocket.py

示例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('|') 
开发者ID:magenta,项目名称:magenta,代码行数:40,代码来源:onsets_frames_transcription_realtime.py

示例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') 
开发者ID:pythonism,项目名称:proxy-checker,代码行数:10,代码来源:prox.py

示例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) 
开发者ID:mikechabot,项目名称:smtp-email-spoofer-py,代码行数:4,代码来源:logger.py

示例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) 
开发者ID:unipacker,项目名称:unipacker,代码行数:30,代码来源:utils.py

示例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='') 
开发者ID:deepjyoti30,项目名称:ytmdl,代码行数:40,代码来源:song.py


注:本文中的colorama.Fore.LIGHTCYAN_EX属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。