Python colorama.Fore.LIGHTMAGENTA_EX Examples
The following are 9
code examples of colorama.Fore.LIGHTMAGENTA_EX().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
colorama.Fore
, or try the search function
.
Example #1
Source File: rpsgame.py From python-for-absolute-beginners-course with MIT License | 5 votes |
def show_header(): print(Fore.LIGHTMAGENTA_EX) print("---------------------------") print(" Rock Paper Scissors") print(" External Libraries Edition") print("---------------------------") print(Fore.WHITE)
Example #2
Source File: rpsgame.py From python-for-absolute-beginners-course with MIT License | 5 votes |
def show_header(): print(Fore.LIGHTMAGENTA_EX) print("---------------------------") print(" Rock Paper Scissors") print(" Error Handling Edition") print("---------------------------") print(Fore.WHITE)
Example #3
Source File: logger.py From brutemap with GNU General Public License v3.0 | 5 votes |
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
Example #4
Source File: file_organise.py From Jarvis with MIT License | 5 votes |
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)
Example #5
Source File: clean_folder.py From Scripting-and-Web-Scraping with MIT License | 5 votes |
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)
Example #6
Source File: models.py From modmail with GNU Affero General Public License v3.0 | 5 votes |
def _info_(*msgs): return f'{Fore.LIGHTMAGENTA_EX}{" ".join(msgs)}{Style.RESET_ALL}'
Example #7
Source File: onsets_frames_transcription_realtime.py From magenta with Apache License 2.0 | 5 votes |
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('|')
Example #8
Source File: logger.py From smtp-email-spoofer-py with GNU General Public License v3.0 | 5 votes |
def bright(line): print(Fore.LIGHTMAGENTA_EX + line + Style.RESET_ALL)
Example #9
Source File: song.py From ytmdl with MIT License | 5 votes |
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='')