On my system, input()
works with colors if you add
import sphinx.quickstart
to your module.
So here is the full code.
from colorama import Fore
import colorama
import sphinx.quickstart
colorama.init()
launch = input(Fore.GREEN + "Launch attack? (Y/N): ")
(This leads to two questions:
- Why does it not work in the first place?
- What is the actual reason? – Someone might like to dive into the sphinx source code.)
N.B. if you run python via winpty
from Git Bash, set convert
.
colorama.init(convert=True)
Otherwise, you do not get color with the current versions.
init
first? – Scutateinit()
. Works fine in 2.7 though. – Scutate