def _pprint_displayhook(value): if value is not None: builtins._ = None # Set '_' to None to avoid recursion if HAVE_PYGMENTS: s = pretty(value) # color case lexer = pyghooks.XonshLexer() tokens = list(pygments.lex(s, lexer=lexer)) print_color(tokens) else: pprint(value) # black & white case builtins._ = value
def _pprint_displayhook(value): if value is None or isinstance(value, HiddenCompletedCommand): return builtins._ = None # Set '_' to None to avoid recursion if HAVE_PYGMENTS: s = pretty(value) # color case lexer = pyghooks.XonshLexer() tokens = list(pygments.lex(s, lexer=lexer)) print_color(tokens) else: pprint(value) # black & white case builtins._ = value
def _pprint_displayhook(value): if value is None or isinstance(value, HiddenCompletedCommand): return builtins._ = None # Set '_' to None to avoid recursion if HAS_PYGMENTS: s = pretty(value) # color case lexer = pyghooks.XonshLexer() tokens = list(pygments.lex(s, lexer=lexer)) print_color(tokens) else: pprint(value) # black & white case builtins._ = value
def _pprint_displayhook(value): if value is not None: builtins._ = value pprint(value)
def _pprint_displayhook(value): if value is not None: builtins._ = None # Set '_' to None to avoid recursion pprint(value) builtins._ = value
def _pprint_displayhook(value): if value is not None: __builtins__['_'] = value pprint(value)
def _pprint_displayhook(value): if value is not None: __builtins__["_"] = value pprint(value)