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)
Beispiel #2
0
 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)
Beispiel #3
0
 def exposed_get_source(self, obj):
     return get_source(obj)
Beispiel #4
0
 def get_source(self, obj):
     return get_source(obj)
Beispiel #5
0
 def exposed_get_source(self, obj):
     return get_source(obj)
Beispiel #6
0
 def get_source(self, obj):
     return get_source(obj)