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


Python Fore.LIGHTMAGENTA_EX属性代码示例

本文整理汇总了Python中colorama.Fore.LIGHTMAGENTA_EX属性的典型用法代码示例。如果您正苦于以下问题:Python Fore.LIGHTMAGENTA_EX属性的具体用法?Python Fore.LIGHTMAGENTA_EX怎么用?Python Fore.LIGHTMAGENTA_EX使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在colorama.Fore的用法示例。


在下文中一共展示了Fore.LIGHTMAGENTA_EX属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: show_header

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTMAGENTA_EX [as 别名]
def show_header():
    print(Fore.LIGHTMAGENTA_EX)
    print("---------------------------")
    print("    Rock Paper Scissors")
    print(" External Libraries Edition")
    print("---------------------------")
    print(Fore.WHITE) 
开发者ID:talkpython,项目名称:python-for-absolute-beginners-course,代码行数:9,代码来源:rpsgame.py

示例2: show_header

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTMAGENTA_EX [as 别名]
def show_header():
    print(Fore.LIGHTMAGENTA_EX)
    print("---------------------------")
    print("    Rock Paper Scissors")
    print("   Error Handling Edition")
    print("---------------------------")
    print(Fore.WHITE) 
开发者ID:talkpython,项目名称:python-for-absolute-beginners-course,代码行数:9,代码来源:rpsgame.py

示例3: colorize

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTMAGENTA_EX [as 别名]
def colorize(self, msg):
        """
        Mewarnai pesan
        """

        color = self.color_map[self.record.levelno]
        reset = Style.RESET_ALL
        levelname = reset + color + self.record.levelname + reset
        if self.record.levelname == "CRITICAL":
            color = self.color_map[logging.ERROR]

        name = Fore.LIGHTBLUE_EX + self.record.name + reset
        message = self.record.message
        # XXX: kenapa cara dibawah ini tidak bekerja?
        #
        # match = re.findall(r"['\"]+(.*?)['\"]+", message)
        # if match:
        #     match.reverse()
        #     for m in match:
        #         message = message.replace(m, color + m + reset, 1)

        match = re.search(r"=> (?P<account>.*?(?:| \: .*?)) \((?P<status>[A-Z]+)\)", message)
        if match:
            account = match.group("account")
            status = match.group("status")
            if status == "NO":
                color_status = Fore.LIGHTRED_EX
            else:
                color_status = Fore.LIGHTGREEN_EX

            newmsg = message.replace(account, color_status + account + reset)
            newmsg = newmsg.replace(status, color_status + status + reset)
            msg = msg.replace(message, newmsg)

        asctime = re.findall(r"\[(.+?)\]", msg)[0]
        msg = msg.replace(asctime, Fore.LIGHTMAGENTA_EX + asctime + reset, 1)
        msg = msg.replace(self.record.name, name, 1)
        msg = msg.replace(self.record.levelname, levelname, 1)
        msg = msg + reset

        return msg 
开发者ID:brutemap-dev,项目名称:brutemap,代码行数:43,代码来源:logger.py

示例4: print_after

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTMAGENTA_EX [as 别名]
def print_after(self, path):
        print(Fore.LIGHTBLUE_EX + "\nFolders after cleaning\n" + Fore.RESET)

        for files in os.listdir(path):
            print(files, sep=',\t')

        print(Fore.LIGHTMAGENTA_EX + "\nCLEANED\n" + Fore.RESET) 
开发者ID:sukeesh,项目名称:Jarvis,代码行数:9,代码来源:file_organise.py

示例5: print_after

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTMAGENTA_EX [as 别名]
def print_after(path):

	print(Fore.LIGHTBLUE_EX  + "\nAfter cleaning\n" + Fore.RESET)

	for files in os.listdir(path):
		print(files,end='\t')

	print(Fore.LIGHTMAGENTA_EX  + "\n\nCLEANED\n" + Fore.RESET) 
开发者ID:umangahuja1,项目名称:Scripting-and-Web-Scraping,代码行数:10,代码来源:clean_folder.py

示例6: _info_

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTMAGENTA_EX [as 别名]
def _info_(*msgs):
        return f'{Fore.LIGHTMAGENTA_EX}{" ".join(msgs)}{Style.RESET_ALL}' 
开发者ID:kyb3r,项目名称:modmail,代码行数:4,代码来源:models.py

示例7: result_collector

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTMAGENTA_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

示例8: bright

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTMAGENTA_EX [as 别名]
def bright(line):
    print(Fore.LIGHTMAGENTA_EX + line + Style.RESET_ALL) 
开发者ID:mikechabot,项目名称:smtp-email-spoofer-py,代码行数:4,代码来源:logger.py

示例9: print_choice

# 需要导入模块: from colorama import Fore [as 别名]
# 或者: from colorama.Fore import LIGHTMAGENTA_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.LIGHTMAGENTA_EX属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。