On my system, input() works with colors if you add
import sphinx.quickstart
to your module.
So here is the complete 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 this not work in the first place?
- What is the reason? - Someone might want to dive into the sphinx source code.)
<i> NB if you run python via winpty from Git Bash , install convert .
colorama.init(convert=True)
Otherwise, you will not get the color with current versions.
source share