def print_source(self, side, args, line): '''Print(if can) source of method or function or class''' obj = get_value_in_context(args.arg, side, self.shell) try: source = side.get_source(obj) if is_remote(obj) else get_source(obj) except (TypeError, IOError) as exc: print_err(exc, debug=debug) return display_html(highlight_python_source(source), raw=True)
def print_source(self, side, args, line): '''Print(if can) source of method or function or class''' obj = get_value_in_context(args.arg, side, self.shell) try: source = side.get_source(obj) if is_remote(obj) else get_source( obj) except (TypeError, IOError) as exc: print_err(exc, debug=debug) return display_html(highlight_python_source(source), raw=True)
def exposed_get_source(self, obj): return get_source(obj)
def get_source(self, obj): return get_source(obj)