Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def monkeyprint(text):
fmter = MonkeyFormatter()
lexer = MonkeyLexer()
lexer.encoding = 'utf-8'
fmter.encoding = 'utf-8'
if text.startswith("Error"):
highlight(text, lexer, fmter, sys.stderr)
else:
highlight(text, lexer, fmter, sys.stdout)