Skip to content

Instantly share code, notes, and snippets.

View ctavolazzi's full-sized avatar

Christopher Tavolazzi ctavolazzi

View GitHub Profile
@ctavolazzi
ctavolazzi / stream_to_console
Created March 9, 2024 03:03
stream_to_console
import sys
import time
def stc(message, delay=0.035, foreground_color=None, background_color=None, rainbow_effect=False, bold=False, underline=False, invert_colors=False, double_underline=False, hidden=False, font_size=None, italic=False, strikethrough=False, background_intensity=None, foreground_intensity=None, end='\n', flush=False, file=sys.stdout):
"""
Streams a message to the console character by character with optional delay, colors, and effects.
Parameters:
message (str): The message to be streamed.
delay (float): Delay between each character display in seconds. Default is 0.035 seconds.