Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def print_red(*args, **kwargs):
if compat.is_fancy_terminal():
sys.stdout.write('\x1b[31m')
print(*args, **kwargs)
if compat.is_fancy_terminal():
sys.stdout.write('\x1b[39m')
def get_display(args):
if args['--quiet']:
return display.QuietDisplay()
elif args['--verbose']:
return display.VerboseDisplay()
elif compat.is_fancy_terminal():
return display.FancyDisplay()
else:
return display.QuietDisplay()
def print_red(*args, **kwargs):
if compat.is_fancy_terminal():
sys.stdout.write('\x1b[31m')
print(*args, **kwargs)
if compat.is_fancy_terminal():
sys.stdout.write('\x1b[39m')