How to use the cloudmonkey.printer.MonkeyLexer function in cloudmonkey

To help you get started, we’ve selected a few cloudmonkey examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / cloudstack-cloudmonkey / cloudmonkey / printer.py View on Github external
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)