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

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -