'Colorama doesn't work on custom printing function?
I have a typewriter function that prints strings in the terminal character by character. I am using this typewriter function instead of "print()". Colorama 'Fore.'doesn't seem to work on my function. Any ideas? Thanks!
import colorama
from colorama import Fore, Back, Style
colorama.init(autoreset=True)
def typewriter(message,s1,s2):
for char in message:
sys.stdout.write(char)
sys.stdout.flush()
if char !="\n":
time.sleep(s1)
else:
time.sleep(s2)
def firstMenu():
typewriter(Fore.YELLOW + "Make a numeric selection: ",0.03,0.2)
typewriter("[1]"+ Fore.YELLOW +"Start")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
