Ejemplo n.º 1
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)
Ejemplo n.º 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)
Ejemplo n.º 3
0
 def exposed_get_source(self, obj):
     return get_source(obj)
Ejemplo n.º 4
0
 def get_source(self, obj):
     return get_source(obj)
Ejemplo n.º 5
0
 def exposed_get_source(self, obj):
     return get_source(obj)
Ejemplo n.º 6
0
 def get_source(self, obj):
     return get_source(obj)