python - Colorama green and yellow does not work -


from colorama import fore, init, style  init(convert=true)  print(fore.green + "green") print(fore.yellow + "yellow") print(fore.red + "red") print(fore.black + "black") print(fore.blue + "blue") print(fore.cyan + "cyan")  print(style.reset_all + '')  input() 

output

what can fix it? using windows 10

since mentioned running in cmd works try using peice of code, had similar issue when using colorama. force program open in cmd fix error.

if "started_with_prompt" not in sys.argv:     cmd = 'cmd /c "'+sys.executable+' '+" ".join(sys.argv)+' started_with_prompt"'     os.system(cmd)     sys.exit() 

Comments

Popular posts from this blog

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -

angular - DownloadURL return null in below code -