Merge pull request #381 from jarun/revert-373-master

Revert "Add better Windows color support using colorama"
This commit is contained in:
Mischievous Meerkat 2019-05-01 19:35:21 +05:30 committed by GitHub
commit de514b94c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

12
buku
View File

@ -4356,9 +4356,7 @@ def read_in(msg):
disable_sigint_handler()
message = None
try:
# Delibrately dong this to better support Windows colorizing
print(msg, end='')
message = input()
message = input(msg)
except KeyboardInterrupt:
print('Interrupted.')
@ -4888,12 +4886,8 @@ POSITIONAL ARGUMENTS:
# only ConEmu is supported. If the user does not use ConEmu, colors are
# disabled unless --colors or %BUKU_COLORS% is specified.
if sys.platform == 'win32' and os.environ.get('ConemuDir') is None:
try:
import colorama
colorama.init()
except ImportError:
if args.colorstr is None and colorstr_env is not None:
args.nc = True
if args.colorstr is None and colorstr_env is not None:
args.nc = True
# Handle color output preference
if args.nc: